JavaScript – Difference Between != and !== Operators

javascriptoperators

What is the difference between the !== operator and the != operator in JavaScript? Does it behave similarly to the === operator where it compares both value and type?

Best Answer

Yes, it's the same operator like ===, just for inequality:

!== - returns true if the two operands are not identical. This operator will not convert the operands types, and only returns false if they are the same type and value. —Wikibooks

Related Question