Skip to content

Instantly share code, notes, and snippets.

@daniel12fsp
Last active November 25, 2018 13:57
Show Gist options
  • Save daniel12fsp/50b91891dd22114a4d3fafdbdd522765 to your computer and use it in GitHub Desktop.
Save daniel12fsp/50b91891dd22114a4d3fafdbdd522765 to your computer and use it in GitHub Desktop.
Range like python for javascript =)
const arr = [...Array(5).keys()];
console.log(arr) //[0, 1, 2, 3, 4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment