Design comparison
Solution retrospective
I have a lot questions for this
-
When i click the button to make api call,why ID and Advice is sometimes not synchronize,for example,ID 116 and the quotes is "It is easy to sit up..." ,but sometimes what it shows is ID 116 but with another quotes.
-
How to make SVG and HR so close each other?because SVG is so wide so the Horizontal Lines (HR) is place in the end of container
Any feedback is welcome,your feedback makes me better and improve every day
Community feedback
- @kmlsonPosted almost 2 years ago
Every time when you run showRandomUserData the random number are generate twice first for your ID then for advice. Insted doing that save your random number in variable then pass to your function.
let random = Math.floor(Math.random() * 5); document.getElementById('id').innerText = `${randomUser[random)].ID} `
You don't need to use hr tag in this project just change colors of your background
body { background-color: hsl(218, 23%, 16%); } .main-content { background-color: hsl(217, 19%, 24%); }
I hope that help you.
You can check my solution
Marked as helpful0@AbibGuardian50Posted almost 2 years ago@kmlson Hi Kmlson Thanks for your solution,i update my code with ur solution and it works fine! Have a great day
0
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