Skip to content

Conversation

@HomamS
Copy link

@HomamS HomamS commented Oct 6, 2019

No description provided.

if (chat.readyState == XMLHttpRequest.DONE) {

let data = JSON.parse(chat.responseText);
console.log(data);
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

}
}
// 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{
Copy link
Contributor

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

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 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);
Copy link
Contributor

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

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