The assignment was to build a JavaScript pizzeria using basic JavaScript concept such as variables, conditionals and native methods.
I followed the instructions in the document carefully and ticked each of them off. It took me a while to understand the difference between “prompt” and “alert”, but I knew I’d begun to get the hang of it when I understood that the code I’d written for the first step was going to be a repeating pattern for the other steps. When implementing the checkout step at the end, I had to go back through the other steps and add extra variables so that I’d have enough information to print the order summary.
Throwing an error was a useful new concept I came across as a way to stop the order process if the customer entered invalid information. Very useful! Another trick I used when styling the page was to comment out the script tag to stop the prompts and alerts from getting in the way. I wanted there to be a way to prevent users from entering invalid input in the prompt, but after some quick research I learned it wasn’t possible.