In JavaScript, all values can be coerced into a Boolean value (i.etrue or false )Most values will evaluate to true , there are just a handful that will be false Aside from the literal false value, the number zero ( 0 ), an empty string ( '' ), NaN , null , and undefined all evaluate to false in a Boolean context.
All other values will evaluate to true (even an empty object ( {} ) or an empty array ( [] ) or a jQuery selector that didn’t select anything)So, what contexts cause this Boolean...(
read more)

.