Last active
June 24, 2023 03:46
-
-
Save Gaafar/e33b6f757793d439070b541437e69bd6 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
const makeRequest = async () => { | |
const data = await getJSON() | |
if (data.needsAnotherRequest) { | |
const moreData = await makeAnotherRequest(data) | |
console.log(moreData) | |
return moreData | |
} else { | |
console.log(data) | |
return data | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!