0

Need help

can someone tell me why in JS var a = {value:20}; var b = {value:20}; alert(a==b); is false plz, i dont understand

3rd Sep 2017, 8:47 AM
Domces Games
Domces Games - avatar
5 odpowiedzi
+ 3
Is it because it's not evaluating the content of the Variable, only the variable itself? Meaning 'a' isn't the same as 'b'?
3rd Sep 2017, 9:23 AM
Tom
Tom - avatar
+ 7
You should do :- alert(a.value==b.value)
3rd Sep 2017, 11:34 AM
Nikhil
Nikhil - avatar
+ 2
i still dont get it, but thx for the link
3rd Sep 2017, 8:52 AM
Domces Games
Domces Games - avatar
+ 2
ohhh, thx
3rd Sep 2017, 9:30 AM
Domces Games
Domces Games - avatar