厳密な比較を行う ===、!== 演算子ですが、!== の方は左辺と右辺の型が違うと false になってしまいます。
alert (1 === 1); // true
alert (1 === 2); // false
alert (1 === '1'); // false
alert (1 !== 1); // false
alert (1 !== 2); // true
alert (1 !== '1'); // false
厳密な比較を行う ===、!== 演算子ですが、!== の方は左辺と右辺の型が違うと false になってしまいます。
alert (1 === 1); // true
alert (1 === 2); // false
alert (1 === '1'); // false
alert (1 !== 1); // false
alert (1 !== 2); // true
alert (1 !== '1'); // false
2014年05月30日の記事を表示しています。