Skip to content

Conversation

@smily342
Copy link

@smily342 smily342 commented Sep 8, 2024

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.

Copy link
Contributor

@HIPPIEKICK HIPPIEKICK left a 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 No newline at end of file
Copy link
Contributor

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') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants