-
Notifications
You must be signed in to change notification settings - Fork 173
liselottesPizza #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
liselottesPizza #150
Conversation
HIPPIEKICK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on completing this JavaScript pizzeria! 🍕
JavaScript
- You're using if and else if statements effectively to handle the different food choices 👍
- Currently, your code assumes that the user will enter valid inputs (e.g., choosing either 1, 2, or 3 for food choices). It would be a good idea to add some input validation to handle unexpected inputs (e.g., if someone enters 4 or a letter).
- Your logic for determining if the person is a child or adult works, but it could be simplified by removing the parseInt(age) call from the if condition and instead check this earlier (in the prompt)
- You've named your variables in a clear and descriptive way overall ⭐
Clean Code
- Your indentation is mostly consistent, but there are a few places where nested code could be indented further for better readability, such as in the deeply nested if-else blocks.
- Please be consistent with whether or not you're using semi colons! If you're using they, you need to learn all the places to put them
Overall, really good job with this project - it's a functioning pizzeria bot 🥳
| `Welcome to our Javascript Pizzeria. Ready to Start? - Click 'OK' to begin.` | ||
| ) | ||
|
|
||
| let person = prompt("Please enter your name:", "Harry Potter"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha! Didn't know you could do this 🤓
|
|
||
| let subChoice | ||
| // Step 1 - Welcome and introduction | ||
| // Your code goes here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove any code and comments that is not useful
|
|
||
| // Step 3 - Subtype choice | ||
| // Your code goes here | ||
| if (foodChoice === "1") { foodChoice = "Pizza" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation
if (foodChoice === "1") {
foodChoice = "Pizza"
https://liselottespizza2.netlify.app/