double pipes in js code example
Example: javascript operator double pipes
// Returns the right-hand operand if the left-hand is 0, false, empty string{, null, undefined or NaN
0 || "other" // "other"
false || "other" // "other"
"" || "other" // "other"
null || "other" // "other"
undefined || "other" // "other"
NaN || "other" // "other"
({}) || "other" // {}
[] || "other" // []