Skip to content

Instantly share code, notes, and snippets.

@EdixonAlberto
Created April 23, 2021 14:29
Show Gist options
  • Save EdixonAlberto/e1fa161affeed261f37e4e2b4909fbce to your computer and use it in GitHub Desktop.
Save EdixonAlberto/e1fa161affeed261f37e4e2b4909fbce to your computer and use it in GitHub Desktop.
Create values range
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