I saw this construction in order to get the browser viewport width:
function () { return window.innerWidth || document.documentElement.clientWidth || documen
The OR function is a short-circuit OR evaluation - it returns the first element that is not false, or the last false element otherwise.
This is actually quite useful, so you can write expressions like
a = a || someValue;
Which is the same as
if (a==null) a = someValue;