DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
js populate an empty array of zeros
const array = new Array(5).fill(0); console.log(array); // [0, 0, 0, 0, 0]
Source by attacomsian.com #
PREVIOUS
NEXT
Tagged:
#js
#populate
#empty
#array
#zeros
ADD COMMENT
Topic
COMMENT
Name
8+1 =
Submit