Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 2.77 KB

README.md

File metadata and controls

46 lines (28 loc) · 2.77 KB

Mirela´s Chatbot

The chatbot project was about building a functional chatbot using JavaScript - along with HTML, and CSS.

The chatbot should welcome the user, read and reply to messages and offer choices for the user through input, buttons and or dropdown menu.

The problem

Step 1:

//Console.log Did not manage to use the console.log directly in the browser - got errors. It works in the code, and I think I am getting the hang of it. It is now my favourite tool for debugging and I like logging messages and decisions. I am not sure if I have fully understood all the benefits and possibilities of the console.log.

Step 2:

//Start Chat: I wanted to start the chat throught a button, but found this too complicated and time consuming while I was working on this step. Did not have the time to go back to it after getting more of a hang on buttons. I hope I can learn this at a later point.

Step 3:

//Show the response from user: I found the next part hard as I was always missing a piece of code to make it work - the example in the instructions was somwehat helpful, but it took time to find the missing piece for me. I found a thread about this topic in slack, so I did the same, which included the userName = nameInput.value part within this function. Not sure why this works and other things I tried do not.

//Send message back I found this part a bit easier, however it took time to figure out where to put the message delay. It was not logical to me that it should be under the previous reply, but I saw an example code on a slack thread and tried it - it worked! I tested having bot messages pop up with a few seconds between them. Now I feel like I understand more how this works.

Step 4:

//Buttons I feel like my main challenge during this project was getting buttons to appear and then being able to respond to them. One of my mistakes was "stupid" and wasted my time, however most of the challenges were related to correct labeling and understanding how functions work and the link to html. I understand the steps of coding the button when I go through them one by one, however it is not logical to me and I don´t think I can recreate it without looking to what I did before (which I maybe could if I understood it better)

//Functions in general I have struggled with understanding how functions work, when to use function vs const funtions, and the DOM. I still feel blank when it comes to this - I feel like I made things work, but not sure how and why.

Step 5:

//If/ else Got the hang of this in this project, however still not clear to me when to use if/else and switch

If I had more time..

I would try to start off with a button, dropdown menu, get back to an input bar, change pictures and more css

View it live

https://mc-chatbot-project.netlify.app/

Mirela