I\'m not sure what this construct means but I\'ve seen it a few times. The example below is from another Stack Overflow question. I\'m not sure how to interpret the initial
The ||
basically means: If Object.keys
is not defined, define it using the expression behind the ||
.
This behavior bases on the JavaScript feature that any variable that is undefined evaluates to false
. If the variable is true
, the second expression does not need to be evaluated, if it is false
it does.