In JavaScript...
'\t\n ' == false // true
I can assume that any string that consists solely of whitespace characters is considered equal to false
in JavaScript.
According to this article, I figured that false
would be converted to 0
, but was unable to find mention of whitespace considered equal to false
using Google.
Why is this? Is there some good reading on the subject besides digging into the ECMAScript spec?