Skip to content

Instantly share code, notes, and snippets.

@ferfabricio
Last active March 18, 2019 17:39
Show Gist options
  • Save ferfabricio/2d03e2f93aec2a62e79e2c98ac8f6dc8 to your computer and use it in GitHub Desktop.
Save ferfabricio/2d03e2f93aec2a62e79e2c98ac8f6dc8 to your computer and use it in GitHub Desktop.
Spread operator
function teste(a, b, ...c) {
console.log(a, b, c)
}
teste(1, 2, 3, 4, 5, 6, 7, 8)
// Resultado:
// 1 2 [ 3, 4, 5, 6, 7, 8 ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment