Skip to content

Instantly share code, notes, and snippets.

@lricoy
Created March 23, 2016 01:49
Show Gist options
  • Save lricoy/1a31c4d6ec91dea0a3d6 to your computer and use it in GitHub Desktop.
Save lricoy/1a31c4d6ec91dea0a3d6 to your computer and use it in GitHub Desktop.
ES2015 Rest
function f(x, ...y) {
// y é um vetor. y[0] === 'hello', y[1] === true
return x * y.length;
}
f(3, "hello", true) == 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment