setFullYearintermediateconst d = new Date(2024, 0, 15)
d.setFullYear(2030)
d.getFullYear() // β 2030Use setFullYear() to mutate the year of a Date object in place; the month and day remain unchanged.
After setting the year, you can immediately read it back with getFullYear().
Challenge: Verify that setting year to 2030 and reading with getFullYear() gives 2030.