Conversation
HIPPIEKICK
left a comment
There was a problem hiding this comment.
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(); | ||
| }); |
HeleneWestrin
left a comment
There was a problem hiding this comment.
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.
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.
Really like this approach, wish I had thought of it ⭐
There was a problem hiding this comment.
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/