Open
Conversation
HIPPIEKICK
approved these changes
Sep 18, 2024
Contributor
HIPPIEKICK
left a comment
There was a problem hiding this comment.
What a fun idea for a chatbot! 🎱
HTML/CSS
- Well structured and styled, not much to say ⭐
- Since you're using the name form for all the inputs, consider changing the class and ID for this (and the corresponding DOM selector) to make it more generic
JavaScript
- You've broken down the code into different functions like saveNameAndRespond, and generateMagic8BallResponse. This modular approach is great for readability and reuse. Kudos for descriptive variable naming!
- Easy to follow the flow, and it feels like you're not overcomplicating things.
- Consider disabling the button or in some other way validating the user input so that it's not possible to send empty inputs
Clean Code
- Be consistent with whether you're using arrow functions or function declarations.
- Remove console.logs before handing it, they are good for developing but not needed in production.
Nice job, I had fun trying this out 😄
Comment on lines
+5
to
+6
| const nameForm | ||
| = document.getElementById('name-form'); |
Contributor
There was a problem hiding this comment.
Slight error here (unnecessary newline):
const nameForm = document.getElementById('name-form');
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Netlify link
Add your Netlify link here.
PS. Don't forget to add it in your readme as well.
https://pink-magic-8-ball.netlify.app/ <----