注意:

toString语法不一样:要转换内容.toString

布尔值转换结果中 0 、null 、‘  ’ (空字符串)、undefined、 NAN这五个值会转化为 false 其他都为true