Answers for "make an array in range"

14

linux install node

sudo apt install nodejs
Posted by: Guest on April-28-2020
1

install latest nodejs stable linux

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install nodejs
npm install -g npm@latest
Posted by: Guest on April-11-2021
1

generate array range

for (i of range(1, 5)) {
    console.log(i);
}
/* Output
 * 1 2 3 4 5 */

[...range(1, 5)] // [1, 2, 3, 4, 5]
Posted by: Guest on July-06-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language