Submitted over 2 years ago
Advice generator using plane CSS and JavaScript
@amalazimroshan
Design comparison
SolutionDesign
Solution retrospective
I had some trouble with returning the value from the function. It showed pending promise. so I wrote the code for displaying the data in the same function that fetch the data
Community feedback
- @eyagargahPosted over 2 years ago
Good job! regarding your question the promise will always log pending as long as its results are not resolved yet so to solve it you should call .then() on the promise to capture the results regardless of the promise state (resolved or still pending):
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