/project-pizza

First javascript workshop project

Primary LanguageJavaScript

The Cheesiest Pizzeria - 1st javascript project

This week we started with the javascript basics. To excercise this we made an alert+prompt website, one version with if statements and one version with switch, so that the user can make an order.

The problem

I started with the if statement version, I found the if statement quite easy and logic. I finished it without pushing it after each step though. So I realized this is something I need to improve and make a habit. Then I went along with the switch version and struggled immensely to get a hang of it. I was't able to get a error alert if the name input was empty, and I had a hard time understanding how to nest switches inside of switches and also how to create cases for the age. It didnt seem like one could use >= in switch for example. But i solved it with a switch (true). I found that this exercise was great for learning the basics of these statements.

View it live

https://cheeziest-pizza.netlify.app