-
Notifications
You must be signed in to change notification settings - Fork 175
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
Pizza Project pull #151
base: main
Are you sure you want to change the base?
Pizza Project pull #151
Conversation
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.
Hey, great job working on this project! 🎉 🍕
JavaScript
Your code meets several key learning goals, such as:
- Variables and Conditionals: You’ve used variables (foodChoice, pizzaType, pastaType, etc.) and conditional statements (if/else if) effectively to branch the logic based on the user's input.
- String Methods: You successfully use .toLowerCase() to make the input case-insensitive, which is a good use of string methods.
- Control Flow: The flow of asking the user for their order and confirming it works well overall, and you’ve used alerts at appropriate moments to keep the user informed.
Consider adding some validation to see so you're getting the expected inputs from your users. When dealing with numerical inputs, it's safer to convert the input to a number using parseInt or Number() before comparing values. For example:
let foodChoice = parseInt(prompt("Choose a food category (1. Pizza, 2. Pasta, 3. Salad):"));
Clean Code
Your code is clean overall, just remember that everything should be in English, even comments (although I love to read some French 🇫🇷 )
Good job Brian, keep it up ⭐
@@ -0,0 +1 @@ | |||
test |
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.
Practicing terminal commands? 😄 Remove any files you're not using before handing in
|
||
// Step 5 - Order confirmation | ||
// Your code goes here | ||
let confirmation = prompt("Would you like to confirm your order? Type 'yes' or 'no'."); | ||
if (confirmation.toLowerCase() == 'yes') { |
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.
Excellent!
Netlify link
Add your Netlify link here like this (update with the correct one):
https://shimmering-sable-93e561.netlify.app/
PS. Don't forget to add it in your readme as well.