Nazar Holubovskyy• 190
@HA3IK
Posted
You don't need to listen to the same event on the same element for each function (DRY). You can call an anonymous function for all the functions you need:
button.addEventListener("click", e => {
newYear();
newMonths();
newDays();
});
Marked as helpful
0