在jQuery的核心风格指南建议两种不同的方法来检查一个变量是否被定义.
typeof variable === "undefined"variable === undefinedobject.prop === undefined为什么jQuery对全局变量使用一种方法而对本地和属性使用另一种方法?
在Javascript中,是myObject == null一种处理undefined和null检查的有效方法吗?
JSLint更喜欢我这样做 (myObject === undefined || myObject === null)
Doug Crockford会做什么?(WWDCD)