Open
Conversation
HIPPIEKICK
approved these changes
Sep 13, 2024
Contributor
HIPPIEKICK
left a comment
There was a problem hiding this comment.
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 No newline at end of file | |||
Contributor
There was a problem hiding this comment.
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') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.