One short solution might be:

let list = [...sequenceGenerator(min, max)]

Documentation on MDN

Answer from philipp on Stack Overflow
๐ŸŒ
DEV Community
dev.to โ€บ emnudge โ€บ generating-arrays-in-js-22bp
Generating Arrays in JS - DEV Community
August 17, 2019 - We're simply incrementing i and adding i onto a predefined array each time we do increment.
๐ŸŒ
CodePen
codepen.io โ€บ jtfm โ€บ pen โ€บ apxJXG
Javascript Array Maker
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
๐ŸŒ
W3Schools
w3schools.com โ€บ js โ€บ js_arrays.asp
JavaScript Arrays
You should use arrays when you want the element names to be numbers. JavaScript has a built-in array constructor new Array().
๐ŸŒ
daily.dev
daily.dev โ€บ home โ€บ blog โ€บ webdev โ€บ js create array of objects: simplified
JS Create Array of Objects: Simplified | daily.dev
May 25, 2026 - If we want to organize our cars by year, we can use Array.sort(). This needs a special rule that tells it how to order the cars. For years, it looks like this: ... This will arrange the cars in order from oldest to newest based on their year. Imagine you have two lists: one with car brands and another with car models. You want to combine these into a single list where each entry is a car with its brand and model. Here's a simple way to do it using JavaScript.
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ how-to-create-an-array-in-javascript
JavaScript Arrays - How to Create an Array in JavaScript
May 16, 2022 - Another way to create an array is to use the Array.of() method. This method takes in any number of arguments and creates a new array instance. ... I hope you enjoyed this article on JavaScript arrays.
Find elsewhere
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ https-medium-com-gladchinda-hacks-for-creating-javascript-arrays-a1b80cb372b
Hacks for Creating JavaScript Arrays
July 18, 2018 - In this code snippet, we used Array.from() to create the new range array of dynamic length and then populate it sequentially incremented numbers by providing a mapping function. Note that the above code snippet will not work for browsers without ES6 support except if you use polyfills. Here are some results from calling the **range()** function defined in the above code snippet: You can get a live code demo by running the following pen on Codepen: In JavaScript, arrays and objects are reference types.
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ article โ€บ how-to-create-arrays-in-javascript
How to create arrays in JavaScript?
March 15, 2026 - Use array literals [] for creating arrays as they are more readable and performant.
๐ŸŒ
YouTube
youtube.com โ€บ watch
How To Create Arrays From Iterables - JavaScript Array From (In 2 Mins) - YouTube
The array "from" function in JavaScript lets you create a new array from an iterable or array-like object. Let's see how it's used in this tutorial.For your ...
Published: July 16, 2024
๐ŸŒ
OneCompiler
onecompiler.com โ€บ javascript โ€บ 3yw2vhknf
Array Generator - JavaScript - OneCompiler
Executable in both browser and server which has Javascript engines like V8(chrome), SpiderMonkey(Firefox) etc. var readline = require("readline") var rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false, }) rl.on("line", function (line) { console.log("Hello, " + line) }) ... An array is a collection of items or values.
๐ŸŒ
JavaScriptSource
javascriptsource.com โ€บ array-creator-3
Array Creator 3 - JavaScriptSource
September 29, 2021 - /* This script and many more are available free online at The JavaScript Source!! http://javascriptsource.com Created by: Mr. J | http://www.huntingground.net/ */ function init(){ array_name=document.f1.t1.value //name of array val2=document.f1.t3a.value ext=document.f1.t4.value for(r=0;r<document.f1.r1.length check="" which="" r1="" radio="" is="" selected="selected" if="" option="document.f1.r1[r].value" value="" document.getelementbyid="" new="" array="" opening="" type="" else=""></document.f1.r1.length>โ€ // opening array type 2 & 3 } if(document.f1.r2[0].checked==true){ // if indexed va
๐ŸŒ
Medium
habtesoft.medium.com โ€บ how-do-you-create-an-array-in-javascript-8cc1f4f5b353
How do you create an array in JavaScript? | by habtesoft | Medium
October 18, 2024 - Method 1: Using array literal notation One of the easiest ways to create an array in JavaScript is to use an array literal notation, which involves enclosing a comma-separated list of values within square brackets.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ javascript โ€บ create-an-array-of-given-size-in-javascript
Create an Array of Given Size in JavaScript - GeeksforGeeks
// Initialize an array using the apply function let arr = Array.apply(null, Array(5)).map( function(){}); // Display the length and generated array console.log("Length of the Array:", arr.length); console.log("Array Values: ", arr);
Published: July 23, 2025
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ javascript-range-create-an-array-of-numbers-with-the-from-method
JavaScript Range โ€“ How to Create an Array of Numbers with .from() in JS ES6
November 7, 2024 - The .from() method is a static method of the Array object in JavaScript ES6. It creates a new, shallow-copied Array instance from an array-like or iterable object like map and set.
๐ŸŒ
@url-decode.com
url-decode.com โ€บ tool โ€บ create-array-js
Text to Array JS - Create JavaScript Array Online
Click the "Create Array" button to convert the text into a JS array to get the sample result.
๐ŸŒ
Milddev
milddev.com โ€บ javascript-create-array-with-n-elements
Create JS Array with n Elements - MildDev
June 24, 2025 - Under the hood, ...Array(size) creates a sparse array of the given length. Mapping over it forces each slot to be touched, returning defined entries. Be cautious about variable scope in loops and maps. Use let or proper closures to avoid issues with index variables. If you ever wonder why your callback sees odd values, check your scope against global variables. For more on scoping, see JavaScript variable scope.