Skip to content

Instantly share code, notes, and snippets.

@ahmehri
Created May 26, 2018 16:37
Show Gist options
  • Save ahmehri/8ba53d6859122b9e6aee4867bb875258 to your computer and use it in GitHub Desktop.
Save ahmehri/8ba53d6859122b9e6aee4867bb875258 to your computer and use it in GitHub Desktop.
Array.from
const result = Array.from({ length: 3 }, (elt, index) => index);
result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment