Skip to content
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

Week 4: Pizzabot #139

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jacquelinekellyhunt
Copy link

Here's my week 4 project for the pizzabot.
Netifly: https://pizzzabot.netlify.app/

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.

Good job with this project 🤖

JavaScript

  • Your code is logically structured and really nice to see you're using functions as well to structure it even more modular ⭐ Just remember that functions (as well as other JS variables) should be named with camelCase and not PascalCase
  • You're using string concatenation with the + operator, which works fine but could be improved by using template literals for better readability and less error-prone code. Example:
alert(`You have chosen ${chosenSubtype}. Thank you, ${userName}!`);

  • In your QuestionFoodType() function, you're using parseInt() to convert user inputs into numbers, which is great for avoiding string comparison issues. Why not use it for the age and confirmation prompts too 😄

Clean Code

  • Make sure to indent your code properly. else if and else statements should start on the ending previous line, e.g.
if (something) {
  //
} else {
  //
}

Keep up the good work, and looking forward to see your progress using functions this week with the chatbot!

Comment on lines +39 to +40
alert("Unfortunately, we don't have that type of dish, please try again!");
choosingFood();
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice ⭐

Copy link

@Fannyhenriques Fannyhenriques left a comment

Choose a reason for hiding this comment

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

Amazing job on your pizza-bot!

Your code is clean and easy to follow, with the descriptive comments throughout.

I really liked how you structured the conversation so that the user receives confirmation after each choice before moving on to the next question. It makes the interaction very clear and user-friendly.

Great job with the alert and prompt to interact with the user. I especially liked how you handled invalid inputs using if, else if, and return statements to ensure the user is prompted to pick again if they choose an invalid number.

Also, really nice touch with the image when the conversation is done!! Super cute!

Overall a great job, the code is well-structured, with thoughtful user interaction! Way to go :)


// Step 4 - Age
// Your code goes here
if (age <= 18) {

Choose a reason for hiding this comment

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

nicely done!! I used a "child" or "adult" in strings but this is a cleaner way.

else {
alert("Unfortunately, we do not have that item on the menu, try again.");
QuestionSubFoodType(foodType);
return;

Choose a reason for hiding this comment

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

nice!!

@jacquelinekellyhunt
Copy link
Author

@Fannyhenriques thank you for your lovely review, very thorough!! <3

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.

3 participants