This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by kraftyboydurp
over 10 years

Why is my code not working? What am I leaving out?

// Add your code below this line! var xhr = new XMLHttpRequest(); xhr.open(“GET”, “http://www.codecademy.com/“, false);

// Add your code above this line!

console.log(xhr.status); console.log(xhr.statusText);

Answer 5241e01f80ff3316f6005fd2

0 votes

Permalink

Never mind I got it.

points
Submitted by kraftyboydurp
over 10 years

3 comments

Carlos Granier-Phelps over 10 years

Care to share with the rest of us?

kraftyboydurp over 10 years

Thank you

kraftyboydurp over 10 years

// Add your code below this line! var xhr = new XMLHttpRequest(); xhr.open(“GET”,”http://www.codecademy.com/",false); xhr.send();

// Add your code above this line!

console.log(xhr.status); console.log(xhr.statusText);

Answer 5242f4a5f10c6039e800012e

0 votes

Permalink

You’re missing the:

xhr.send();

below your xhr.open().

points
over 10 years

1 comments

VACoder almost 10 years

even with the send the code is not executing. I’m using Firefox.