Difference between “ == “ and “ === “ operators.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our W3Make Forum to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
In JavaScript, the
==
operator is called the loose equality operator. It compares two values after converting them to a common type. For example, if you compare a string with a number using==
, JavaScript will convert the string to a number before making the comparison.On the other hand, the
===
operator is called the strict equality operator. It compares two values without converting them to a common type. If the types of the two values are different, then they are not equal.