Link to home
Create AccountLog in
Avatar of Snowbella Hatchiko
Snowbella Hatchiko

asked on

Need help with Javascript

Hi Experts
I need help with Javascript...


function ticket(){
      
var ticketType = prompt("what sort of tickets do you want?");
var ticketQty = parseInt(prompt("how many tickets do you want?"));
var ticketPrice;
switch (ticketPrice){
      case "A":
      case "100":
      break;
      case "B":
      case "75":
      break;
      case "C":
      case "50":
      break;
      case "!A":
      case "!B":
      case "!C":
      document.write("Invalid Ticket Type");
      break;
      case
}
document.write("Ticket type is " + ticketType + "<br>");
document.write("Ticket quantity is " + ticketQty);
}
SOLUTION
Avatar of Kim Walker
Kim Walker
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.