False ?? | Sololearn: Learn to code for FREE!

0

False ??

Why the answer is false ?? https://www.sololearn.com/post/914981/?ref=app

js

2/2/2021 11:21:20 AM

Carbon dioxide

5 Answers

New Answer

+4

Because in js object can't be compared . comparing 2 objects always return false though they have same property & same value .

+4

Jeff's JK (HTML challenger and the coders 💻)🇮🇩 var a =[1,2,3]; var b=[1,2,3]; alert(a==b);//false a=b; alert(a==b);//true

+2

This article does a great job in explaining that. https://www.google.com/url?sa=t&source=web&rct=j&url=https://medium.com/javascript-in-plain-english/comparing-objects-in-javascript-ce2dc1f3de7f&ved=2ahUKEwjc25ebkcvuAhWFjeYKHY9kC7sQFjACegQIAxAB&usg=AOvVaw3kCaPjXya8vtEs855xoGKH&cshid=1612267346507

+1

Hmm ... -_- Always false ??