摘要: typeof运算符可以判断表达式的类型,根据表达式返回七种结果:number,string,boolean,undefined,object,function,symbol typeof的用法有两种: 1.typeof a 2.typeof(a) 对于数字来说,typeof返回number,这里数字 阅读全文
posted @ 2018-09-03 20:41 某个润滑君 阅读(3551) 评论(0) 推荐(0) 编辑
摘要: 任何对象转换为boolean值都为trueundefined对应的boolean值为falsenull对应的boolean值为false空字符串为false非空字符串为true非零数字为true0为falseNaN为false ==操作符 ==操作符不会尝试将左右操作数转换为boolean值后再进行 阅读全文
posted @ 2018-09-03 14:59 某个润滑君 阅读(262) 评论(0) 推荐(0) 编辑