var str = false + 1; console.log(str);// 1 var demo = false == 1; console.log(demo);// 0 if (typeof(a) && -true + (+undefined) + ‘‘){ console.log(‘不错‘); } if (11 + "11" * 2 ==33){ console.log(‘不错‘) } !!" " + !!"" -!!false || console.log(‘pork!!‘);
(window.foo || (window.foo = ‘bar‘)) console.log(foo)
两个题可以做做看
原文地址:https://www.cnblogs.com/punisher999/p/12150777.html
时间: 2024-11-09 02:45:55