Last active
May 8, 2017 17:09
-
-
Save coltpini/95330e2945e978ed2fc0e070c70246c0 to your computer and use it in GitHub Desktop.
This file contains 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 *exponents(start) { | |
yield start ** 1; | |
yield start ** 2; | |
yield start ** 3; | |
return 4; | |
} | |
for (let val of exponents(4)) { | |
console.log(val); | |
} | |
// 4, 16, 64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment