Why does the creation of a string object not return true when compared strictly to a primitive string value?
var obj = new String('0');
var str = '0';
console.log(obj == str); //returns true
console.log(obj === str); //returns false
Why does the creation of a string object not return true when compared strictly to a primitive string value?
var obj = new String('0');
var str = '0';
console.log(obj == str); //returns true
console.log(obj === str); //returns false