Landed to this question, searching for default parameters in EcmaScript 2015, thus just mentioning...
With ES6 we can do default parameters:
function doSomething(optionalParam = "defaultValue"){
console.log(optionalParam);//not required to check for falsy values
}
doSomething(); //"defaultValue"
doSomething("myvalue"); //"myvalue"