var a = !!b; 的意思就是如果b为 非null/undefined/0""/false等值 则a等于true 反之为false 注意用上!! 则返回值一定是true或者false 实质就是 b == "null"||"undifined……