[] == ![]; // -> true
+[] == +![]
0 == +false
true == []; // -> false
true == ![]; // -> false
false == []; // -> true
false == ![]; // -> true
true == []; // -> false
true == ![]; // -> false
// According to the specification
true == []; // -> false
toNumber(true); // -> 1
toNumber([]); // -> 0
1 == 0; // -> false
true == ![]; // -> false
![]; // -> false
false == []; // -> true
false == ![]; // -> true
// According to the specification
false == []; // -> true
toNumber(false); // -> 0
toNumber([]); // -> 0
0 == 0; // -> true
false == ![]; // -> false
![]; // -> false
false == false; // -> true
typeof NaN; // -> 'number'
instanceof NaN; // -> 'SyntaxError'
NaN === NaN; -> ?
typeof []; // -> 'object'
typeof null; // -> 'object'
null instanceof Object; // false
Object.prototype.toString.call(null); // -> '[object Null]'
Object.prototype.toString.call([]); // -> '[object Array]'
null > 0; // false
null == 0; // false
null >= 0; // true
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
3 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |