array.fill ()index code example Example: js fill array with count elements Array(3).fill(4); // [4, 4, 4]