Last active
July 15, 2019 04:47
-
-
Save MichaelObi/6e2a1fe1aec0741c19dc00aad26580f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetchBill = () => { | |
const api = "https://randomapi.com/api/006b08a801d82d0c9824dcfdfdfa3b3c" | |
fetch(api).then((response) => { | |
if (reponse.status !== 200) { | |
console.log("Error" + response.status) | |
return; | |
} | |
return response.json() | |
}).then((data) => { | |
displayCartTotal(data) | |
}).catch((err) => { | |
console.log('Fetch Error :-S', err); | |
}); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment