When would JavaScript == make more sense than ===?

Posted by bryantsai on Stack Overflow See other posts from Stack Overflow or by bryantsai
Published on 2010-01-25T14:24:51Z Indexed on 2010/04/09 14:13 UTC
Read the original article Hit count: 204

Filed under:
|
|

As 359494 indicates they are basically identical except '===' also ensures type equality and hence '==' might perform type conversion. In Douglas Crockford's JavaScript: The Good Parts, it is advised to always avoid '=='. However, I'm wondering what the original thought of designing two set of equality operators was.

Have you seen any situation that using '==' actually is more suitable than using '==='?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about equality