_mercury β 22-39 Jul 27
how to create an array in js with same value 100 times ?
3 Replies
Array.from({ length: 100 }, () => value);
The function also gives you item (undefined) and index if you want to generate some array basing off indicesgreat thanx
This thread hasnβt had any activity in 12 hours, so itβs now locked.
Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1001982148653367377