function checkFetchStatus(response) {
  if (response.status !== 200) {
    console.log("Failed to get data from API. Status code: " + response.status);
    return Promise.reject(response);
  } else {
    return Promise.resolve(response);
  }
}
// AJAX request for 12 random users using Fetch
AJAX request for 12 random users using Fetch
AJAX request for 12 random users using Fetch
function checkFetchStatus(response) {
  if (response.status !== 200) {
    console.log("Failed to get data from API. Status code: " + response.status);
    return Promise.reject(response);
  } else {
    return Promise.resolve(response);
  }
}
function checkFetchStatus ( response ) { if ( response . status !== 200 ) { console . log ( "Failed to get data from API. Status code: " + response . status ) ; return Promise . reject ( response ) ; } else { return Promise . resolve ( response ) ; } }
AJAX request for 12 random users using Fetch
AJAX request for 12 random users using Fetch