Everyone who come across comparison of objects in JavaScript struggle a lot with this topic because this syntax(===) is not represented in any other popular languages. They only have == and that’s it.
The problem is that I can’t really understand the difference between === and == and the purpose of it. We don’t have anything like that in any other popular languages like python, Java or C++.
I would like to clearly understand the pros and cons of using === in my code if you have any useful articles or other pieces of information please share.
Basically, the only real difference is that
===includes the type in the comparison; whereas==is just the value.Would be true, while:
Would be false