Array.prototype.fillintermediateconst zeros = new Array(5).fill(0)
zeros // β [0, 0, 0, 0, 0]Combine new Array(n) with fill(0) to create a zero-initialized array of length n.
A common pattern is to create a fixed-length array initialized to a default value. new Array(n).fill(0) creates an n-element array of zeros without using a loop.
Challenge: Implement createMatrix(n) that returns an array of n zeros.
createMatrix(5) // β [0, 0, 0, 0, 0]
createMatrix(0) // β []