Most of the developers on my current project use a (to me) strange
way to check for empty strings in ECMAScript:
(theString.length == 0) // string is empty
I would normally write this instead:
== "") // string is empty
version seems more readable and natural to me.
asked seemed to be able to explain the advantages of version 1. I
guess that at some time in the past somebody told everybody that this
is the way to do it, but now that person left and nobody remembers why
it should be done this way.