Created
March 23, 2016 01:51
-
-
Save lricoy/75d761e9ee7e19d934ed to your computer and use it in GitHub Desktop.
ES2015 Spread
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function f(x, y, z) { | |
// x === 1, y === 2, z === 3 | |
return x + y + z; | |
} | |
// Passa cada elemento do vetor como um argumento | |
f(...[1,2,3]) == 6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment