Categories
interview

Create Array of size in Js

const arr = Array(3).fill(5);
console.log(arr); // [5, 5, 5]

Demo