Skip to content

Instantly share code, notes, and snippets.

@amit-srivastava-007
Last active October 31, 2017 09:44
Show Gist options
  • Save amit-srivastava-007/97187d6efa18c39ff5bb87c2b1926afe to your computer and use it in GitHub Desktop.
Save amit-srivastava-007/97187d6efa18c39ff5bb87c2b1926afe to your computer and use it in GitHub Desktop.
Create array of object with range start to end
getRange(start, end){
new Array(end - start).fill().map((d, i) => ({ name: i + start, id: i + start }))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment