This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.

Smartphone icons created by Freepik - Flaticon

JS setMonth()

The setMonth() method sets the month of a date object.

Note that months count from 0. December is month 11:

const d = new Date();
d.setMonth(11);
document.getElementById("demo").innerHTML = d;