Design comparison
SolutionDesign
Solution retrospective
Any Feedback are welcome
Community feedback
- @jgengo-altPosted almost 3 years ago
Hey Alan!
You did great!
I would suggest to save your JS in a different file, as you did for the stylesheet! ;)
You can also take a look at await/async instead of the arrowed promises, that from what I understood tends to be less used. Even if await/async are actually Promises .. :D
For example
const randomize = async () => { const quote_id = document.querySelector('#quote_id'); const quote_text = document.querySelector('#quote_text') const data = await fetch('https://api.adviceslip.com/advice'); const json = await data.json(); quote_id.textContent = json.slip.id quote_text.textContent = json.slip.advice }
Marked as helpful1@Alan1234111Posted almost 3 years ago@jgengo-alt Thank you, I will implement it in my project
0 - @optimusprime202Posted almost 3 years ago
Hey @Alan1234111, Congratulations, you got it right!
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