This forum is now read-only. Please use our new forums! Go to forums
16/19 NEED HELP
// Add your code below this line! var xhr = newXMLHttpRequest(); var xhr.open(“GET”,”http://www.codecademy.com/",false); var xhr.send();
// Add your code above this line!
console.log(xhr.status); console.log(xhr.statusText); CAN ANYONE PLEASE TELL WHAT IM DOING WRONG??. IT SI TELLING ME THAT I NEED A SEMICOLON??
Answer 55ad518d76b8febc76000375
The code in the second line should be: xhr.open(“GET”, “https://www.codecademy.com/“, false); The differences is that the address in the original code started with http instead of https.
This works:
var xhr = new XMLHttpRequest(); xhr.open(“GET”, “https://www.codecademy.com/“, false); // Add your code below! xhr.send(); console.log(xhr.status); console.log(xhr.statusText);
Answer 5431ae3752f8639077005af4
I think the issue is that you’re calling the variable (“var”) multiple times - you should just use “var” at the beginning.
Try this: var xhr = newXMLHttpRequest(); xhr.open(“GET”,”http://www.codecademy.com/",false); xhr.send();
2 comments
you forgot a space David change it to this: var xhr = new XMLHttpRequest();
// 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); this works
Answer 545687b08c1cccbb480052ee
This one is working fine for me:
// 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 54f37a0193767630ac004c6a
Your problem was when you said newXMLHttpRequest(); You were suppose to space out new like so new XMLHttpRequest();
Answer 548866e186f5528e42002199
None of the above seem to be working for me… any ideas ?! Console still shows: “NetworkError: Failed to execute ‘send’ on ‘XMLHttpRequest’: Failed to load ‘http://www.codeacademy.com/‘.”
Connections seems good though
4 comments
its codecademy not codeacademy :)
i tried everything else but that, its codecademy. lol
i feel so dumb
had the same issue… HAHA
Answer 549872ec51b887614c007dd3
Try this one
// 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 54a3cad176b8fec921018d6f
Answer 54a3ce0586f552face019230
It is codecademy. Holu fuck all this while I thought it was codeacademy. What a way to teach students about the site itself.
1 comments
Watch the language :):):):):):) jk
Answer 5438c92980ff33aecc000d51
give space after ‘new’ keyword var xhr = new XMLHttpRequest();
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
1 comments
This one works. they should really fix that.