Why is [] !== []
in JavaScript?
I read through https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness but I could not find anything that explains this.
Edit:
I don't think this question or this question is an exact duplicate of mine. It asks about the ==
operator which just behaves crazy. The answer is an answer to my question but it's not the same question.
[] == []
and[] === []
both return false. – Tarsometatarsus==
and===
behave the same but when I was searching I didn't and a lot of people probably think the same. So the duplicate you provided was about==
which is a different thing if you don't already know the answer... – Unkindly