function calculatePay() {
  const band = document.getElementById("band").value;
  const normalHours = document.getElementById("normalHours").value;
  const unsocialHours = document.getElementById("unsocialHours").value;
  const sundayHours = document.getElementById("sundayHours").value;
  let pay = 0;
  switch (band) {
    case "band1":
      pay = normalHours * 10 + unsocialHours * 5 + sundayHours * 15;
      break;
    case "band2":
      pay = normalHours * 15 + unsocialHours * 10 + sundayHours * 20;
      break;
    case "band3":
      pay = normalHours * 20 + unsocialHours * 15 + sundayHours * 25;
      break;
  }
  document.getElementById("output").value = pay.toFixed(2);
}
In this calculator, the user selects their band from a drop-down list, inputs their normal, unsocial, and Sunday hours, and clicks the "Calculate Pay" button. The JavaScript function calculatePay() retrieves the values of the inputs, calculates the pay based on the selected band, and updates the output input with the calculated pay. Note that the pay is calculated using different rates for each band, and that the pay is formatted with two decimal places using the toFixed() method.