the pleasures and perils of JavaScript’s promiscuous comparison operator
¶ by Rob FrieselSpoiler alert: toString has its mitts in everything. This all started when we saw a candidate put the following into an exercise we had given him: if (arrayToTest == ”) Our first thought was well that seems wrong… And though it seems like something that shouldn’t work, it did–when the array contained a single item, […]