-
Notifications
You must be signed in to change notification settings - Fork 12
Chatbot4 #23
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
base: master
Are you sure you want to change the base?
Chatbot4 #23
Conversation
| if (chat.readyState == XMLHttpRequest.DONE) { | ||
|
|
||
| let data = JSON.parse(chat.responseText); | ||
| console.log(data); |
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.
clean up your console logs
| } | ||
| } | ||
| // Imn this step i add if statement inside the excisting else in order to do the action when we type "Show mw a dog" | ||
| else{ |
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.
this can be an else if statement
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.
I would move this condition to be the first since the logic is much shorter
|
|
||
| // I declare function to use it for the alert | ||
| function delayedAlert(){ | ||
| setTimeout(function(){alert("Did you forget about me? It is your friend, the Alarm!")}, 2000); |
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.
spacing needs to be fixed
No description provided.