javascript preencher array code example Example: javascript preencher array com 0 const fill = new Array(5).fill(0) console.log(fill) // [ 0,0,0,0,0]