Design comparison
SolutionDesign
Solution retrospective
Hi! I would really appreciate any recommendations on how to improve my code. I'm also curious about how to change the fetch function I used to an async function. Thanks again!
Community feedback
- @NikolaD93Posted almost 2 years ago
Hello there! 👋
Congrats for completing the challenge! 🙌
Here is an example of async/await 👇
const getUsers = async () => { const response = await fetch("https://jsonplaceholder.typicode.com/users") const data = await response.json(); console.log(data); }
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function
Hope this was helpful for you, and you have a great day!
Happy holidays! 🎉✌
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord