Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Demo the difference between == and ===
- alert(5 == "5");
- alert(5 === "5");
- // Check out what happens with >
- alert(5 > "4");
- alert(5 > 4);
- true
- false
- true
- true
- typeof a === typeof b && a > b
- var num_as_string = '4';
- var num = +num_as_string;
- if (5 > num) { ... }
- 12 > '100' // false
- '12' > 100 // false
- '12' > '100' // true
- null > 0 // false
- null < 0 // false
- null >= 0 // true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement