Is there a good JS shorthand reference out there?
Updated with ECMAScript 2015 (ES6) goodies. See at the bottom. The most common conditional shorthands are: a = a || b // if a is falsy use b as default a || (a = b) // another version of assigning a default value a = b ? c : d // if b then c … Read more