Last active
October 31, 2017 09:44
-
-
Save amit-srivastava-007/97187d6efa18c39ff5bb87c2b1926afe to your computer and use it in GitHub Desktop.
Create array of object with range start to end
This file contains 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
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