在 JavaScript 比较中应该使用哪个等于运算符(vs) ?

I'm using JSLint to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.

Is there a performance benefit to replacing == with ===?

Any performance improvement would be welcomed as many comparison operators exist.

If no type conversion takes place, would there be a performance gain over ==?

转载于:https://stackoverflow.com/questions/359494/which-equals-operator-vs-should-be-used-in-javascript-comparisons