Skip to content

Instantly share code, notes, and snippets.

@gskachkov
Created December 23, 2015 18:57
Show Gist options
  • Save gskachkov/d771479451c7c5036cf3 to your computer and use it in GitHub Desktop.
Save gskachkov/d771479451c7c5036cf3 to your computer and use it in GitHub Desktop.
arrow lexical bind arguments
var af = function (x, y) {
let arr;
if (false) {
let arguments = 0;
arr = () => arguments;
} else {
let arguments = 1;
arr = () => arguments;
}
return arr;
}
var val = af(10, 12);
debug(val() === 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment