Learning JavaScript? Download my free JavaScript Handbook 🔥

Simple solution:

Array(12).fill(0)

fill() is a new method introduced in ES6.



NEW

Follow my new project: From Zero to App

A video-based learning project where I create a React + GraphQL app from idea to deployment! 9 free videos already out!