你不知道的JavaScript中,读书笔记

时间:2017-08-21 21:27:57   收藏:0   阅读:293

七种内置类型

null, undefined, boolean, number, string, object, symbol

typeof null === ‘object‘ // true

null 是 typeof 是 object 的唯一的假值

typeof function 会返回 ‘function‘

使用 typeof x !== ‘undefined‘ 比直接判断 x 更加安全,因为不会引发 reference error

原文:http://www.cnblogs.com/07akioni/p/7406714.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!