0
Question from code challenges
Hello, can someone please explain this solution? var x = { age: 24 } var y = x; var z = { age: 24 } alert(y !== (x !== z)) Why is the end result in the end true? Thanks
3 Respuestas
+ 3
x !== z -> True (object can't be equal with the another object even they have same property with the value!) so it is true
y is an object, x !== z is a boolean. These two are not strictly equal.
So the result is true!
+ 1
Thanks Matiyas!
+ 1
You welcome David