On Sat, May 31, 2014 at 1:59 PM, Nicholas C. Zakas
<[email protected]> wrote:
> 1. Who is right about assigning a default value to a destructured parameter,
> Firefox or Traceur?
Traceur is right.
> 2. Is the behavior of not having any bindings for destructured parameter
> properties correct? And if so, is it desirable?
I think you're mistaken about this. What happens is that
function setCookie(name, value, { secure, path, domain, expires }) {
console.log(secure);
// ...
}
behaves like
function setCookie(name, value, options) {
var { secure, path, domain, expires } = options;
console.log(secure);
// ...
}
and the error is in trying to unpack options, which is undefined, not
in later trying to use the variables.
-j
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss