Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.