Check while using Boolean in javascript
by Mohan[ Edit ] 2012-09-20 22:32:36
Boolean
Be aware of checking these comparisons, because it will save you time from debugging the script.
'' == '0' // false
0 == '' // true
0 == '0' // true
false == 'false' // false
false == '0' // true
false == undefined // false
false == null // false
null == undefined // true
true == 1 // true
'' == null // false
false == '' // true