-
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
Trattoria pizzeria #147
base: main
Are you sure you want to change the base?
Trattoria pizzeria #147
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.
Great job on your project! I can see you have put in a lot of effort to make this dynamic 🍕
JavaScript
- Really nice that you're preloading the background image! Clever 👀
- Excellent validation, super nice that you've created a function for this!
- Nice usage of objects as well! For future reference: name object keys in lowercase
- Nice usage of the while loop, and nice validation with isNan 👍
Clean Code
Your code is easy to follow and is well-formatted too.
Keep up the good work, I'm impressed by the complexity of this project. Shows that you're eager to proceed to coming weeks' material 😉
code/script.js
Outdated
document.getElementById("startOrder").addEventListener("click", (event) => { | ||
event.preventDefault(); //the default action is stopped i.e promt | ||
startOrder(); | ||
}); |
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.
⭐
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.
Sorry for the late review Zoe!
Your code was really easy to follow and very nice overall. Very inspiring. It was hard to find anything to suggest improvement on 😄 Great work!! I just had one suggestion that could improve the user experience somewhat.
Keep up the good work!
@@ -1,19 +1,160 @@ | |||
// Start here | |||
// preloads the background img to avoid delays |
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.
Very smart to preload the background image 👍
// Your code goes here | ||
// Function to get valid user selection | ||
// Two parameters (promptText: for questions), (options: for valid inputs) | ||
const getValidSelection = (promptText, options) => { |
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.
Really like this approach, wish I had thought of it ⭐
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.
The only thing I thought of while trying your bot was that as a user I couldn't cancel during the order process. Clicking "Cancel" just prompted the "Invalid option" alert over and over. Maybe find a way to check if the user has clicked "Cancel" and then cancel the order instead.
https://trattoria-pizzeria.netlify.app/