I had an interesting interview question today that stumped me a little. I was asked about falsey values. So undefined, NaN, null, 0, and an empty string all evaluate to fals
It is important to know that 0 evaluates to false to prevent doing things like:
0
false
if(str.indexOf('foo'))