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);
}
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
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.