Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript fill array

const fill = new Array(5).fill(0)
console.log(fill) // [ 0,0,0,0,0]
 
PREVIOUS NEXT
Tagged: #javascript #fill #array
ADD COMMENT
Topic
Name
5+9 =