Undifined 与 null


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

typeof(undefined) == ‘undefined’
typeof(null) == ‘object’
虽然 null == undefined的结果(true) 但还是有区别的,就是和数字运算时,10 + null结果为:10;10 + undefined结果为:NaN。