Created
August 10, 2021 14:54
-
-
Save Ebazhanov/7e3ac86c405a2871a696332e9554503f 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 fetchData = (apiUrl) => { | |
return fetch(apiUrl).then((response)=> response.json()); | |
}; | |
const data = fetchData("awesomeApi.com/data/subscribe"); | |
console.log(data.name); | |
console.log(data.email); | |
console.log(data.age); | |
console.log(data.isMarried); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment