I vote for handling undefined and missing the same way. Default function parameters are implemented in javascript using a check for undefined - an example:
function multiply(a, b) {
b = (typeof b !== 'undefined') ? b : 1;
return a * b;
}
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I vote for handling
undefined
and missing the same way. Default function parameters are implemented in javascript using a check for undefined - an example:Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters
I believe adding a distinction between undefined and missing breaks the spec too.