Clarification on function default param values

Brandon Benvie bbenvie at mozilla.com
Mon Sep 30 20:48:29 PDT 2013


I'm actually now really curious what the following does:

```
function foo(x, y = (() => { arguments[0] = "foo"; return "bar" })()) {
   return [x, y];
}

foo(5);
```

Arrow functions are not implicitly strict currently, right? If so, the 
above should return `["foo", "bar"]`.


More information about the es-discuss mailing list