1var x = 5;
2
3// === equal value and equal type
4// e.g. 1.
5x === 5 returns true
6
7// e.g. 2.
8x === "5" returns false
9
10// !== not equal value or not equal type
11// e.g. 1.
12x !== 5 returns false
13
14// e.g. 2.
15x !== "5" returns true
16
17// e.g. 3.
18x !== 8 returns true
1var point = { x:1, y:1 }; // Define an object
2var has_x_coord = "x" in point; // Evaluates to true
3var has_y_coord = "y" in point; // Evaluates to true
4var has_z_coord = "z" in point; // Evaluates to false; not a 3-D point
5var ts = "toString" in point; // Inherited property; evaluates to true