You have this line else { console.log("Status code" + xhr.status); }
Instead of doing a console.log, this is the perfect place for you to instead put an error message in the page saying 'Sorry there is a problem with the movie database'.
This way the user knows there is problem, instead of nothing happening.
You have this line
else { console.log("Status code" + xhr.status); }
Instead of doing a console.log, this is the perfect place for you to instead put an error message in the page saying 'Sorry there is a problem with the movie database'.
This way the user knows there is problem, instead of nothing happening.