DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
fill array with 0 javascript
const arrayWithZeros = Array(4).fill(0) // ES6! console.log(arrayWithZeros) // [0, 0, 0, 0]
Source by developer.mozilla.org #
PREVIOUS
NEXT
Tagged:
#fill
#array
#javascript
ADD COMMENT
Topic
COMMENT
Name
9+1 =
Submit