This assignment is to create a chatbot using html, css and javascript. The chat bot prompts the user with questions to which the user can reply. The bot's questions and the users answers are shown in message bubbles on the browser giving the visual representation of a conversation between two people.
The hero function in this code is the showMessage function which posts the sender's message to either the bot chat or the user chat. This funciton was used in all of my handlefunctions where the bot asked the user new questions and they replied with either an input field or buttons. I used an event listener and the onclick() method for the buttons.
If i had more time i would be more creative in the content of the bot and give it more of a specific theme. I would also add a different input element like a drop down menu. Something else i would do is clean up the variable and function names, i would make them more consistent and clearer. If i could do it over again i would also not have specific questions depending on what was answered becasue the user doesn't get to experience all of the questions this way.
https://64f5b5465cc9ab2afc45affc--exquisite-sunflower-e4ae9f.netlify.app/