Created
November 24, 2018 15:36
-
-
Save ElectricCoffee/97e4d408448da8f5a98a56a8d7302e28 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
/** Python-style range function */ | |
function range(n) { | |
let arr = new Array(n); | |
let result = [...arr.keys()].map(m => Number(m)); | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment