Operators &&and ||do not return boolean values in JavaScript.
a = b && c;
essentially equivalent to:
a = !b ? b : c;
and
a = b || c;
essentially equivalent to:
a = b ? b : c;
The coalescing behavior of these operators is useful in some cases.
For an operator, ||it can be used to expand namespaces that may or may not exist:
//use window.foo if it exists, otherwise create it
window.foo = window.foo || {};
&& :
window.console && console.log('something');