Why should I use string.length == 0 over string == "" when checking for empty string in ECMAScript?
Most of the developers on my current project use a (to me) strange way to check for empty strings in ECMAScript: if (theString.length == 0) // string is empty I would normally write this instead: if (theString == "") // string is empty The latter version seems more readable and natural to me. Nobody I asked seemed to be ab...