2010-05-07から1日間の記事一覧

演算子メモ

if(true || false){... if(true && false){... var hoge = "" || "a"; と && は共に演算子の右側から評価を行っていく。 は最後に評価された true のものが返る。全て false の場合に false が返る。 && は全て true の場合に最初に true と評価され…

関数の参照、undefined と null とか

関数の参照方法 オブジェクトの関数には通常 Hoge.method(); と参照するが、次のような参照方法もある。 Hoge["method"](); undefined と null alert(typeof undefined); // undefined alert(typeof null); // object