Skip to content
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

The French Bot - Chatbot project - Jenny A #295

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jempa182
Copy link

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.

What a cute bot idea 🇫🇷 😊 Let's look at some feedback!

JavaScript

  • Nice addition with a sound! Crazy idea - would be fun with different sounds if the user answers right or wrong
  • The code is divided into logical functions, which is a good practice. For instance, separating the playSendSound and playReceiveSound functions helps keep the code modular.
  • If the user clicks the send button multiple times quickly, it might cause unintended behavior (e.g., repeated messages). To prevent this, consider disabling the input field and button temporarily during processing.

Clean Code

  • Variables and functions have clear and descriptive names, such as handleNameInput, createFrenchButtons, and playSendSound. This makes the code readable and maintainable. Consider changing e.g. goodByeMessage to follow the same convention

Nice idea and well executed ⭐

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha 👌

Send
</button>
</form>
<div id="button-container" style="display: none;"></div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep styling out of the HTML file 👀

buttonContainer.style.display = 'flex'; // Show buttons

// Add event listeners to buttons
buttonContainer.querySelectorAll('button').forEach(button => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice usage of forEach 👍

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