2017年6月9日
摘要: var o={flag:true}; var test=!!o.flag;//等效于var test=o.flag||false; alert(test); 由于对null与undefined用!操作符时都会产生true的结果, 所以用两个感叹号的作用就在于, 如果明确设置了o中flag的值(非 n 阅读全文
posted @ 2017-06-09 19:13 XIE7654 阅读(140) 评论(0) 推荐(0)