全等(===)
第一次发现全等(===)这个比较运算符:
=== 全等(值和类型)
<script type="text/javascript">
var x = 5;
document.writeln(x == 5); // true
document.writeln(x == '5'); // true
document.writeln(x === 5); // true
document.writeln(x === '5'); // false
document.writeln(x != '5'); // false
document.writeln(x !== '5'); // true
</script>
var x = 5;
document.writeln(x == 5); // true
document.writeln(x == '5'); // true
document.writeln(x === 5); // true
document.writeln(x === '5'); // false
document.writeln(x != '5'); // false
document.writeln(x !== '5'); // true
</script>