Can anyone help me to understand the difference in obj1
and obj2
created in two ways in JavaScript? They look the same in the console.
var obj1 = { 'name': 'blue', 'shade': 'dark'};
var obj2 = JSON.parse('{"name":"blue","shade":"dark"}');
because
(obj1 === obj2) is false as
(obj1 == obj2) is false
while in javascript console show as
Object {name: "blue", shade: "dark"}
Object {name: "blue", shade: "dark"}