function-expressions

The function keyword can be used to define a function inside an expression.

0

functions that are assigned to buttons are anonymous

these dont have a name and are unique to that expression


increaseButton.onclick = function () {
  count += 1;
  pCount.innerHTML = count;
};
decreaseButton.onclick = function () {
  count -= 1;
  pCount.innerHTML = count;
};