Last active
July 13, 2019 19:19
-
-
Save parvezmrobin/06993efde16c4bc75be7e3e36a5060c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function* colors() { | |
| const colors = ['red', 'blue', 'green']; | |
| for(let i = 0; ; i = (i+1) % 3) { | |
| yield colors[i]; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment