variable defaults javascript es6

JavaScript
let variableToSet = checkedValue || defaultValue;
Source

Also in JavaScript: