-
Notifications
You must be signed in to change notification settings - Fork 411
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
Music Maven- My music Quiz Bot #288
base: main
Are you sure you want to change the base?
Conversation
…s to DOM selectors, variables and several functions.
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.
Ha, what a superb idea for a chatbot! 🎵 I got 6/8 🥳 Let's have a look at some feedback.
JavaScript
- Well-defined DOM selectors and global variables!
- Storing questions as objects and placing them in an array is a great way to manage the quiz data. This allows for easy expansion of the quiz by simply adding new question objects to the array 🥳
- The logic flow for the quiz works well 👍
Clean Code
- Remember to follow JS naming convention and name all your variables with camelCase.
- Be consistent with whether you're using double or single quotes
Quite advanced flow, a bit out of scope so it's no wonder you feel like you have to recap what you've done. Hopefully it will clear up a bit in the coming weeks. Keep up the good work ⭐
code/script.js
Outdated
|
||
// Functions goes here 👇 | ||
let currentQuestionNumber = 1 // Start with Question 1 | ||
let score= 0 |
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.
let score = 0
*
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
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.
Ending with one empty line is enough 😉
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.
What a great idea to make a quiz chatbot! I like that you made your own design, with new images for the user and bot. The code structure is clean and easy to follow, the comments make the code even easier to follow. The functions askQuestion and checkAnswer are written in a way that can be reused for each question, which is excellent.
The only thing I noticed that can be improved, is that the chat works like a charm on desktop, but on a mobile I need to scroll to see the options for each question. The media queries in the CSS are a bit unstructured so it's hard to see what does what.
Overall, I think your chatbot is awesome! Well done, Anna!
Netlify link
https://musicmaven.netlify.app/