Olian04
6/5/2017 - 6:43 PM

From https://stackoverflow.com/questions/476436/is-there-a-null-coalescing-operator-in-javascript

var whatIWant = someString || "Cookies!";

// Examples
var whatIWant = null || new ShinyObject(); // is a new shiny object
var whatIWant = undefined || "well defined"; // is "well defined"
var whatIWant = 0 || 42; // is 42
var whatIWant = "" || "a million bucks"; // is "a million bucks"
var whatIWant = "false" || "no way"; // is "false"