前端 + pics 2016-10-13 本文已影响10人 YH的练手记 JavaScript把null、undefined、0、NaN和空字符串''视为false,其他值一概视为true,因此上述代码条件判断的结果是true。