This is extremely for the optional parameters important
function foo (bar, bak=1, qux=2) {
}
// here I want `bar` to be default, but the `quux` take another value
foo(5, qux: 3);
People often suggest object destruction here, but it is then just a
workaround. And when the arguments are renamed during the minification, all
the labels in function calls can be minified accordingly too.
On 11 July 2015 at 23:47, Benjamin Gruenbaum <[email protected]> wrote:
> Hey, I wasn't able to find information about the current status of a named
> parameters propsosal:
>
> // as in:
> foo(bar = 5); // logs 5
>
> function foo(baz, bak, bar){
> console.log(bar);
> }
>
> Is this being considered? Was it decided for/against? Anyone working on it?
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss