Created
April 23, 2021 14:29
-
-
Save EdixonAlberto/e1fa161affeed261f37e4e2b4909fbce to your computer and use it in GitHub Desktop.
Create values range
This file contains hidden or 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
const maxLimit = 1; | |
const minLimit = 5; | |
const range = [...Array(maxLimit - minLimit).fill().map((_, i) => minLimit + i), maxLimit]; | |
console.log(range); // out: [1, 2, 3, 4, 5] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment