Skip to content

Instantly share code, notes, and snippets.

@fabriziogiordano
Created January 14, 2018 02:15
Show Gist options
  • Save fabriziogiordano/5f5dc865ba8e6129576fb70544bfa8a3 to your computer and use it in GitHub Desktop.
Save fabriziogiordano/5f5dc865ba8e6129576fb70544bfa8a3 to your computer and use it in GitHub Desktop.
Number.prototype[Symbol.iterator] = function*() {
for (let i = 0; i <= this; i++) {
yield i;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment