- Create an empty HTML file.
- Create and link a JavaScript file to your
index.html
page. - In your JavaScript file, make an AJAX request to
"https://jsonplaceholder.typicode.com"
/users
endpoint. This request should log the first 5 users to the console. - Create a function
getLog
that takes a URL string argument, makes a GET request to that URL, and then logs the response to the console. - Create a more general function,
get
, that takes two arguments, a URL and a callback function. This function should make a GET request to the URL and pass the response to the given callback function. Test this function out on"https://jsonplaceholder.typicode.com/posts"
devonte202 / ajax_fluency Goto Github PK
View Code? Open in Web Editor NEWThis project forked from the-marcy-lab-school/ajax_fluency
Code Fluency: AJAX Practice
License: GNU General Public License v3.0