ECMA Script 6 compared two values

Comparing two values with ECMA Script 6 makes it simple with the Object.is method.

console.log(Object.is(1, 1));
console.log(Object.is(2, 1));

The first line will output true and the second line will output false.

Like this post? Kindly share!