Pass a value to the generator using next() method in JavaScript
Originally posted here!
The yield keyword in the generator function is commonly used to return a value from the generator function.
But what if I told you it can do more than that!
It can also accept a value to a generator function.
Let's understand...
melvingeorge-me.hashnode.dev4 min read