Clarification on function default param values

Brandon Benvie bbenvie at
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];


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

More information about the es-discuss mailing list