Homework
Burger order system
Write an HTML page which asks the user two questions using prompt
:
What burger would you like?
Would you like fries with that (yes/no)?
For the first question, the user can type in anything. For the second question, we expect a "yes" or "no" answer.
Example 1
Let's say the user typed in "cheeseburger" for the first question.
If they said "yes" to fries your website should display this text:
If they said "no" to fries, it should say:
Example 2
Let's say the user typed in "vege burger" for the first question.
If they said "yes" to fries your website should display this text:
If they said "no" to fries, it should say:
Optional extensions:
If they said yes to fries, also ask what size fries.
Calculate the price based on their order, and show the price too.
Last updated
Was this helpful?