Exercise 16 of "How to use APIs with JavaScript Not Working"


#1



Replace this line with your code.


#2

Codecademy now uses https so you have to update address given in instructions to https version:

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