In JavaScript, what is the difference between '===' and '=='?
Anonymous
Since JavaScript is a loosely typed language, the identity operator or '===' doesn't convert both variables to the same data type before comparing equality, whereas the equality operator or '==' does. In order for two variables to be equal using the identity operator they must both be of the same type and value, whereas with the equality operator only the value needs to be the same.
Check out your Company Bowl for anonymous work chats.