Skip to content

Instantly share code, notes, and snippets.

@kthjm
Last active March 3, 2017 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kthjm/0c12b4c7d8408ad12459a501a572b764 to your computer and use it in GitHub Desktop.
Save kthjm/0c12b4c7d8408ad12459a501a572b764 to your computer and use it in GitHub Desktop.
function* wannaIterable(length){
let from = 0;
while(from < length){
yield from++;
}
}
[...wannaIterable(10)].forEach(num=>console.log(`hello_${num}`));
@kthjm
Copy link
Author

kthjm commented Mar 3, 2017

test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment