Last active
February 27, 2018 08:51
-
-
Save vldvel/8e029a8b66e27ad07d645ef77a1112fc to your computer and use it in GitHub Desktop.
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
const array = [1, 2, 3]; | |
function sum(a, b, c) { | |
return a + b + c; | |
} | |
sum(1, 2, 3); // 6 | |
sum(...array); // = sum(...[1, 2, 3]) = sum(1, 2, 3) -> 6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment