Skip to content

Instantly share code, notes, and snippets.

Avatar

Imad Bouziani imadbz

View GitHub Profile
@imadbz
imadbz / 1_primitive_comparison.js
Last active Feb 18, 2019 — forked from nicbell/1_primitive_comparison.js
Dropin replacement for '===' that supports deep objects compare. JavaScript object deep comparison.Comparing x === y, where x and y are values, return true or false. Comparing x === y, where x and y are objects, returns true if x and y refer to the same object. Otherwise, returns false even if the objects appear identical.Here is a solution to c…
View 1_primitive_comparison.js
//Primitive Type Comparison
var a = 1;
var b = 1;
var c = a;
console.log(a == b); //true
console.log(a === b); //true
console.log(a == c); //true
console.log(a === c); //true
You can’t perform that action at this time.