JSFiddle - React, Tailwind, and code Playground

JavaScript

function totalCost(cups)
    {
      var tax = (cups * 9 ) /100;
      var totalAmount = parseFloat(cups + tax).toFixed(2);
      return totalAmount;
    }

    var name = prompt("Please enter your name");
    var cups = prompt("Ok " +  name + ", how many cups of tea would you like?");
     
    document.write("Ok " + name + ", you ordered" + cups + " of tea" + " your  total price is " + totalCost(cups));