logo

Crowdly

3.3 You are building a pizza ordering assistant. The user types a size option: ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

3.3 You are building a pizza ordering assistant. The user types a size option: small, medium, or large.     

·         Small: “You selected a small pizza. R60 – enough for one person!”

·         Medium: “Medium pizza selected. R100 – a good choice for two.”

·         Large: “A large pizza! R140 – perfect for the whole family!”

If the input is anything else, show:

“Sorry, that size is not available. Please choose small, medium, or large.”

Task:

Write a JavaScript program to:

·         Prompt the user to select a pizza size.

·         Use if...else if to display price and portion info.

·         Show an error for invalid input.

Your manager has provided an image of the desired JS App (see below) and asked you to design a JavaScript page. (15 Marks)

 

More questions like this

Want instant access to all verified answers on learning.richfield.ac.za?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!