Skip to content

Instantly share code, notes, and snippets.

@Ibro
Last active April 26, 2017 04:57
Show Gist options
  • Save Ibro/2613905f6fe75ec5e0d5032ab46d947a to your computer and use it in GitHub Desktop.
Save Ibro/2613905f6fe75ec5e0d5032ab46d947a to your computer and use it in GitHub Desktop.
Symbol.iterator with arguments object - Coding Blast - www.codingblast.com
function doSomething(a, b, c) {
let it = arguments[Symbol.iterator]();
console.log(it.next()); // {value: 13, done: false}
console.log(it.next()); // {value: 15, done: false}
console.log(it.next()); // {value: 17, done: false}
console.log(it.next()); // {value: undefined, done: true}
}
doSomething(13, 15, 17);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment