Code example 5-2const tax = .07;const getCost = (itemCost, n…

Code example 5-2const tax = .07;const getCost = (itemCost, numItems) => {      const subtotal = itemCost * numItems;      const tax = 0.06;      const total = subtotal + (subtotal * tax);      return total;}const totalCost = getCost(25.00, 3);alert(“Your cost is $” + totalCost.toFixed(2) + ” including a tax of ” +          tax.toFixed(2)); Refer to code example 5-2. This code contains an error. What is it?

Code example 5-3document.addEventListener(“DOMContentLoaded”…

Code example 5-3document.addEventListener(“DOMContentLoaded”, () => {   document.querySelector(“#ship_button”).addEventListener(“click”, evt =>   {      evt.preventDefault();      alert(evt.currentTarget.value);   });   alert(“Welcome to the Calculate Cost page”);}); Refer to code example 5-3. What happens as soon as the page that contains the code loads?

Code example 5-2const tax = .07;const getCost = (itemCost, n…

Code example 5-2const tax = .07;const getCost = (itemCost, numItems) => {      const subtotal = itemCost * numItems;      const tax = 0.06;      const total = subtotal + (subtotal * tax);      return total;}const totalCost = getCost(25.00, 3);alert(“Your cost is $” + totalCost.toFixed(2) + ” including a tax of ” +          tax.toFixed(2)); Refer to code example 5-2. Which constant stores the arrow function?