Questions about the onchange incident?

//
y.addEventListener("change", function() {
  year = this.value
  month = month
  dayInWeek = new Date(year, month, 1).getDay()
  printDay()
})

m.addEventListener("change", function() {
  year = year
  month = this.value
  dayInWeek = new Date(year, month, 1).getDay()
  printDay()
})
The

y event can be triggered and executed. After m triggers, the entire calendar becomes blank, as shown in the following figure:

looking around for no reason, please let me know

Mar.24,2022

after m triggers

you print out the value and dayInWeek of m

you should know why

Menu