Last active
March 13, 2017 22:58
-
-
Save roobie/b2e986208dd8b00642dc to your computer and use it in GitHub Desktop.
range
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 range (from, to, step) { | |
| return new Array(Math.ceil((to - from) / (step || 1))) | |
| .join(' ').split(' ') | |
| .map(function (_, i) { | |
| return from + (i * (step || 1)) | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment