Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
untitled notebook
node v18.11.0
version:
master
endpoint
share
tweet
//Simplest example of a custom iterator function myIterator(){ let a = 0; return { next: function(){return a++} } } let it = myIterator(); console.log(it.next()); console.log(it.next()); console.log(it.next());
Loading…
no comments
sign in
to comment