Created
February 22, 2018 16:47
-
-
Save deadlysyn/f8d39ddcc9edf0aa84be9e4e0bc5fb84 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Axios | |
const btnAxios = document.querySelector('#btnAxios') | |
btnAxios.addEventListener('click', function() { | |
axios.get(API) | |
.then(function(res) { | |
PRICE.textContent = res.data.bpi.USD.rate + ' USD' | |
}) | |
.catch(function(err) { | |
console.log(err) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment