Paramètre obligatoire sténographie javascript

// Mandatory Parameter Shorthand
// Longhand:
function foo(bar) {
  if(bar === undefined) {
    return ('Missing parameter!');
  }
  return bar;
}
console.log(foo());


// Shorthand:
mandatory = () => {
  return ('Missing parameter!');
}
foo_ = (bar = mandatory()) => {
  return bar;
}
console.log(foo_());
Chetan Nada