Skip to content

Conversation

@IamLise
Copy link

@IamLise IamLise commented Sep 8, 2024

@IamLise IamLise changed the title Add files via upload liselottesPizza Sep 8, 2024
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.

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");
Copy link
Contributor

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
Copy link
Contributor

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"
Copy link
Contributor

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"

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