Open ajhsu opened 7 years ago
The || operator returns the left-most truthy operand. If no truthy operand is provided, it returns the right-side operand.
The && operator returns the right-most falsy operand. If no falsy operand is provided, it returns the right-side operand.
Quoted from first of first comment of this article: http://www.codereadability.com/javascript-default-parameters-with-or-operator/
Quoted from first of first comment of this article: http://www.codereadability.com/javascript-default-parameters-with-or-operator/