SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the SpreadOpeator and the map() function to create an array with the same element repeated multiple times.
function fillArray(value,len){ return [...Array(len).keys()].map(x=> value); }