Simple solution:
Array(12).fill(0)
fill()
is a new method introduced in ES6.
Find out how you can initialize a new array with a set of values in JavaScript
Simple solution:
Array(12).fill(0)
fill()
is a new method introduced in ES6.
THE VALLEY OF CODE
THE WEB DEVELOPER's MANUAL
You might be interested in those things I do: