// ---------------------------------------------------- // JavaScript primitive value types: // numbers, strings, booleans, null, and undefined // ---------------------------------------------------- // primitive types are compared by value var a = 1; var b = 2; if (a !== b) { console.log("a is not equal to b"); //a is not equal to b }; // assign a's value to b b = a; if (a === b) { console.log("a is equal to b"); // a is equal to b }; // if we change b, the value of a remains unchanged b = 8; console.log("a: " + a); // a: 1 console.log("b: " + b); // b: 8