Conversation
…he name of the user
- worked on a first greeting by the bot and button to click for the user
- added new function to order food
HIPPIEKICK
left a comment
There was a problem hiding this comment.
Nice work on this project! 🎉 You've put a lot of effort into creating a dynamic chatbot. Let's go through some feedback:
HTML/CSS
- The HTML and CSS looks good and structured 🌟
- There's some commented-out code (a div with a crab image). It's a good habit to remove or uncomment this code to maintain a clean file. If it's not needed, just get rid of it to avoid clutter.
JavaScript
- You've done a great job dividing the script into multiple functions ⭐
- Good start with checking if the username is entered in the askName() function!
- Consider refactoring to create smaller, reusable functions where there's repeated logic (like setting up buttons and event listeners). This will make your code more modular and easier to debug or extend in the future. For example: the chooseFish, chooseShellfish and chooseMollusks could be one function called chooseDish and do different things based on different params.
Clean Code
- Your code is quite readable, with consistent naming conventions and the use of comments to explain sections. 👌 However, I noticed some commented-out code that should be removed if it's not going to be used.
- Consider refactoring to create smaller, reusable functions where there's repeated logic (like setting up buttons and event listeners). This will make your code more modular and easier to debug or extend in the future.
- Remember to indent properly, even when you're writing HTML in the JS file
Keep up the good work, and continue to think about good descriptive names for your variables and keep the code modular!
| </form> | ||
| </div> | ||
| </main> | ||
| <body id='body'> |
There was a problem hiding this comment.
HTML attributes should always be in double quotes
HeleneWestrin
left a comment
There was a problem hiding this comment.
Really great work, Gitte! The code was really easy to follow and felt well structured. I couldn't come up with any areas to improve (with my current knowledge anyhow) 😄 Just one tiny suggestion for the CSS.
Keep it up ⭐
| } | ||
|
|
||
| /* buttons to choose the food category */ | ||
| .foodtype-container, |
There was a problem hiding this comment.
Since these containers and buttons seem to have the exact same CSS, perhaps you could have just used the same class on each element instead of having unique class names for each.
https://seafood-restaurant-order-bot.netlify.app/