srtrict equality code example
Example 1: strict equality
console.log(1 === 1);
console.log('hello' === 'hello');
console.log('1' === 1);
console.log(0 === false);
console.log("hello" === "hello");
console.log("hello" === "hola");
console.log(3 === 3);
console.log(3 === 4);
console.log(true === true);
console.log(true === false);
console.log(null === null);
console.log("3" === 3);
console.log(true === 1);
console.log(null === undefined);
const object1 = {
name: "hello"
}
const object2 = {
name: "hello"
}
console.log(object1 === object2);
console.log(object1 === object1);
Example 2: js ===
5 =='5'
5 === '5'