Skip to content

Conversation

@hamzakoc
Copy link

@hamzakoc hamzakoc commented Oct 6, 2019

No description provided.



//print variable
console.log(chatbot)
Copy link
Contributor

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


}else if (question.includes("dog")){//if input includes dog below function will work

let image = new XMLHttpRequest(); //gives info from APIs
Copy link
Contributor

Choose a reason for hiding this comment

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

I would abstract this into another function since this makes this function super long and doing too many things.. we want to make code as readable as possible

image.send();//sends request

} else if (question.includes("alarm")){//if input includes dog below function will work
function delayedAlert(){
Copy link
Contributor

Choose a reason for hiding this comment

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

same for this, I would define the function outside the reply() function

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