Skip to content

Instantly share code, notes, and snippets.

@ilearnjavascript
Last active March 28, 2019 23:19
Show Gist options
  • Save ilearnjavascript/e6b3324b9c7a293e76e7a844594869e9 to your computer and use it in GitHub Desktop.
Save ilearnjavascript/e6b3324b9c7a293e76e7a844594869e9 to your computer and use it in GitHub Desktop.
es6 - rest parameter - 3.js
var restParameterWithArgs = function (firstname, lastname, ...adress) {
console.log(arguments)
}
restParameterWithArgs('John', 'Doe', 'Example Street 1', '12345', 'Exampletown');
// outputs: ["John", "Doe", "Example Street 1", "12345", "Exampletown", callee: (...), Symbol(Symbol.iterator): ƒ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment