getMonthbeginnerconst d = new Date(2024, 5, 15) // June
d.getMonth() // β 5
// 0=Jan, 11=DecUse getMonth() to retrieve the zero-indexed month (0 = January through 11 = December) of a Date in local time.
getMonth() always returns an integer between 0 and 11.
Challenge: Verify that Number.isInteger(new Date(2024, 0, 15).getMonth()) is true.