Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 2 years ago

Mobile First Solution: Sass

Fidelisuzoma•380
@UzomaFidelis
A solution to the Advice generator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This was my first time using an api call in javascript. I should point point out that I've only been learning and using js going on two months now, so I have limited experience with some aspects of it especially with asynchronous functions.

I tried to implement some sort of feedback to the user when the api call fails due to bad network. I was able to get it working (sort of). If you tried to generate an advice without a connection you'd see what I did. The issue is. I wanted to be able to make the api call retry a couple of times before giving that feedback; right now it just gives the error once it fails the first time. Tried to research some solutions online but some persons were using 'Promises' which I frankly don't understand well at this point. If you know a way I could do something like that or you can point me to a good resource to learn about promises, I'd be very grateful. Thanks in advance

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Fidelisuzoma's solution.

Join 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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License