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

0 points
Submitted by Bertie Green
about 11 years

Having issues with 4.2

Hey all–

Can you please help? Not sure why I’m getting this incorrect:

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

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

Thanks! BG

Answer 50f5a35811c11bfcef000961

1 vote

Permalink

You are right up to where you need to include the variable name, xhr, in the .send

var xhr = new XMLHttpRequest(); xhr.open(“GET”, “http://www.codecademy.com/“, false); xhr.send(xhr); console.log(xhr.status); console.log(xhr.statusText);

points
Submitted by Patrick Ryan
about 11 years

Answer 51095207568527d43c000c39

1 vote

Permalink

The site is “”codecademy” not code Academy.

points
Submitted by mckinsey2
about 11 years

Answer 50f5829a006eee38fd004d43

0 votes

Permalink

my code which worked looked exactly the same but one point, the “var xhr” part was just “xhr” for me. Hope that will woork for you.

points
Submitted by Simon Palmén
about 11 years

3 comments

Bertie Green about 11 years

Dang– still doesn’t work. Do you mind copying your code into here please?

Ross Roberts about 11 years

copy the url exactly as in the example, or above, the url is not codeacademy, but codecademy.

Kevin Strong about 11 years

Yes, had the same problem. I thought the URL was “codeacademy” and once changed to “codecademy” it worked fine.

Answer 5500420f9113cb6116001ecf

0 votes

Permalink

refreshing the page helps as well..

points
Submitted by Rizwan
about 9 years