Appropriate usage of == and === in JavaScript
This question already has an answer here:
The ==
operator means equality after type conversion
1 == '1'; // true
1 == 1; // true
The ===
operator means equality without any conversion
1 === '1'; // false
1 === 1; // true
链接地址: http://www.djcxy.com/p/19434.html
上一篇: javascript奇怪的比较字符串