ES6 how to set method param as optional code example Example: variable defaults javascript es6 let variableToSet = checkedValue || defaultValue;