5
I’m using the Jslint to check if the Javascript source code complies with the coding rules, and it is returning many suggestions to replace ==
(two signs of equals) with ===
(three signs of equals) when doing things like comparing idlol.value.length == 0
on parole if
.
There is a performance benefit to replacing ==
for ===
?
If no type conversion occurs, there will be a performance gain in relation to ==
?
I don’t remember any of them and I doubt that Jslint will make any suggestions for performance, even more of a micro-optimization. See more at https://answall.com/questions/7/qual-a-difference-entre-os-operatorss-e-em-javascript
– Andre Figueiredo
I just don’t remember now, but I saw a page that benchmarks these operators, and the
==
stands in front of the===
.– Sam
@dvd, that question exists in Brothers but I did not find the answers clear enough, even because my English is bad. Check out the Brothers https://stackoverflow.com/questions/359494/which-equals-operator-vs-should-be-used-in-javascript-comparisons
– user60252
I’ve seen it before. D
– Sam