Frontend Mentor - Advice generator app solution
Design comparison
Solution retrospective
The next challenge, which i finish. Now im focused on the JS so i try working with challenge which have the JS. If someone see something wrong or what i can do better it will be great for me.
Community feedback
- @isprutfromuaPosted over 2 years ago
Hi there. You did a good job π
keep improving your programming skills
your solution looks great, however, if you want to improve it, you can follow these steps:
π’ your initial layout has no advice number. It looks as bug)
π’ try to follow a single code style throughout the program. In almost all places you use arrow functions, and only for handle the fetch request - the usual anonymous function. Also try to use destructing.
.then(({slip}) => { const {id, advice} = slip; titleId.textContent = id; randomText.textContent = advice; })
Looks more cleaner, right?
π’ Change id class to box__id instead of box__title--id, because it's not a modificator
I hope my feedback will be helpful
Good luck and fun coding π€β¨οΈ
Marked as helpful1@margsoftbfPosted over 2 years ago@isprutfromua Thanks, for help i changed everything what you said. Thanks a lot :)
0@isprutfromuaPosted over 2 years ago@margsoftbf Hi there
I'm glad it was useful to you
Cheers, peace and happy coding!
0 - @allyson-s-codePosted over 2 years ago
I think it looks great! I thought your code was easy to read, too.
I have to say I was overcomplicating matters with my own version of this project with the two sizes of svgs. I was reading about
viewbox
(for way toooo long) and trying a javascript function for the change in media size. Your solution is simple, just cssdisplay: none
anddisplay: block
. Perfect! It is so helpful looking at other peoples code!Well done!
Marked as helpful0
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