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