星期二, 4月 26, 2011

判別試 if else 簡寫

if ... else的簡寫如下


(condition)?statment1:statment2

condition 是條件式
statement1 是當條件成立時執行
statement2 是不成立時執行

沒有留言:

張貼留言