variable value as a property field in javascript code example
Example 1: javascript object get property or default
// won't work if obj.property is falsey
let value = obj.property || "default";
Example 2: javascript object string property
// Also useful for dynamic strings, e.g. `thing-${variable}`
myObject['thing'] = true;