This forum is now read-only. Please use our new forums at discuss.codecademy.com.

How to use APIs with JavaScript Forum

View Course » View Exercise

230 points
50fde54c769c3b961000191a_479392392
Submitted by
Nicolas Lepage
almost 5 years ago

4.2 - Answer

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

39 votes

permalink

I just realized that the name of this website is Codecademy and not Codeacademy. DUH! Thanks for posting.

719 points
4f1023641e57e8bd6b060c931e5c4a98?s=140&d=retro
Submitted by
toovali
almost 5 years ago

18 Comments

Picture raymond komlan amegadjin almost 5 years ago

D*** couldn't figure it out all this while . Thanks

507a3f01918e7b02000028df_295181801 Jack Chi almost 5 years ago

same here

524355aa548c357765000178_59608109 Jonas Lomholdt almost 5 years ago

Haha, thanks for this! Only just realized this.

526da440abf8217c0e0000b2_690570673 Nathan Lloyd almost 5 years ago

I got the first part right, just forgot to send it :/

Ce9e4805b5b114f82fb25ad52f852b5c?s=140&d=retro mike almost 5 years ago

same, codecademy not codeacademy ;)

Picture Nabil El Alaoui Sossey almost 5 years ago

This was my problem with this exercise too. I kept spelling it CodeAcademy and not Codecademy. LOL!

5001f0f43bfd8d0002000ee0_826759493 Emanuel Hahn almost 5 years ago

everything was a lie until this point

53f3764e282ae3da53000455_587160470 Julijana Seketa over 4 years ago

the same thing happend to my little sister. wow.

Picture Jakub 'Dielo' Greksa over 4 years ago

BURN! :D

50c257f7b6813bf979007e14_965098079 Simon Bromberg over 4 years ago

:O

522496adabf821e7c1002190_376007614 Tom over 4 years ago

Snap! Been using this site for weeks and have only just noticed! Durrr

5397067480ff33b25200132d_250769213 Sirscribble about 4 years ago

been using this site for months and months and until you said.... oh how i didnt know >.< xDD

537ccbea9c4e9de5870000ca_973792293 eduller0001 over 3 years ago

u all are really just knew tht i knew tht since the beggining of time for i am a time lord

537ccbea9c4e9de5870000ca_973792293 eduller0001 over 3 years ago

feel my two hearts

537ccbea9c4e9de5870000ca_973792293 eduller0001 over 3 years ago

1234 1234 1234 1234

B8f52b3b76f2deb4eb75d817a12b7af3?s=140&d=retro Lori S. over 3 years ago

^I don't know who you are but I like you

554cf7c951b88777180008a6_744481352 Adrian Pardo over 2 years ago

same issue -.-

561ecae79376769dce000566_340535453 Stefan Frank about 2 years ago

Same here! (facepalm)


3 votes

permalink

Another thing to be aware of: You need the www in the URL or it will fail.

1278 points
511d89d33aab9a445f001ec9_882336710
Submitted by
Alli
almost 5 years ago

1 Comment

32e55ae7db6998ae81c21578747d1b16?s=140&d=retro Ivan over 4 years ago

That was my problem, thanks! :)


0 votes

permalink

I found this post to be very helpful in seeing my errors. I realized I didn't need var in front of xhr.open and false didn't need parentheses these simple errors can be crucial when coding.

473 points
36a3f743544addb2b321ba6c2806b418?s=140&d=retro
Submitted by
Tameeka Powell
over 4 years ago


-7 votes

permalink

Just goes to show that most people don't know or type the domain in properly, which can only mean that codeacademy is a poor site name haha.

690 points
D40259d3c97b5ce551d23c6e409eb7e9?s=140&d=retro
Submitted by
hain54
almost 5 years ago

4 Comments

32e55ae7db6998ae81c21578747d1b16?s=140&d=retro Ivan over 4 years ago

You typed in the wrong name it's codecademy not codeacademy. And I don't agree with you.

D40259d3c97b5ce551d23c6e409eb7e9?s=140&d=retro hain54 over 4 years ago

Don't get sour now Ivan, it was only a joke.

You're probably new here, but the original name was codeacademy. Try visiting codeacademy and the URL will redirect.

The name is hard to remember or type out, too many vowels in it. you're definitely new to the internet in general.

B547e00a7a763d6f2a0110aeb17f7264?s=140&d=retro admin6 over 2 years ago

@hais54 and @Ivan STAHP FIGHTING

55c96525e39efe607a000784_727349661 Tr0j4n V1ru5 Coding over 2 years ago

ERROR 9999999; BANNED!