学习笔记: JS运算符 — 关系运算符
Time: 10-03-2 Comments: 0
一. == 和===
- 1. 这两个运算符都接受任意类型的运算数,比较数字,字符串和布尔值时,进行的是值比较。
-
alert(1 == '1'); // true alert(1 === '1'); // false alert(Infinity === Infinity); // true
Time: 10-03-2 Comments: 0
alert(1 == '1'); // true alert(1 === '1'); // false alert(Infinity === Infinity); // true