js类型转换

在使用if(xxx){}时,xxx只需记住这5个false值,其他的都会转换为true,另外不要用==用===

  1. NaN
  2. undefined
  3. null
  4. 0
  5. ‘’