Creating a sequential array that start from a certain number with certain number of items

Viewed 50

Is there an elegant way (without a for loop) to create a sequential array in Javascript which starts from a certain number and has a certain numbers of items. for example:

Start from 2017 and has 4 items will look like:

[2017, 2018, 2019, 2020]

thanks

1 Answers
Related