Simple solution:

Array(12).fill(0)

fill() is a new method introduced in ES6.

Download my free JavaScript Beginner's Handbook, and check out my premium React/Vue/Svelte/Node/Next.js courses!