Answers for "fill an array of zeroes in js"

0

fill an array of zeroes in js

const array = new Array(5).fill(0);

console.log(array);

// [0, 0, 0, 0, 0]
Posted by: Guest on September-17-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language