Javascript === vs == : Does it matter which "equal" operator I use?

Posted by bcasp on Stack Overflow See other posts from Stack Overflow or by bcasp
Published on 2008-12-11T14:19:49Z Indexed on 2010/06/14 18:02 UTC
Read the original article Hit count: 146

Filed under:
|
|

I'm using JSLint to go through some horrific JavaScript at work and it's returning a huge number of suggestions to replace == with === when doing things like comparing 'idSele_UNVEHtype.value.length == 0' inside of an if statement.

I'm basically wondering if there is a performance benefit to replacing == with ===. Any performance improvement would probably be welcomed as there are hundreds (if not thousands) of these comparison operators being used throughout the file.

I tried searching for relevant information to this question, but trying to search for something like '=== vs ==' doesn't seem to work so well with search engines...

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about Identity