Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

All comments

  • @RuHd

    Submitted

    This app is designed to retrieve a random advices from a API called ADVICE SLIP JSON API (https://api.adviceslip.com). This challenge was much easier than the previous one ( the age calculator), and I thought it'd be tougher because of the API. I used the fetch() method to make the request from the URL and convert the json to a actual JS object. It's always fun to work with API. Hope you all enjoy it!

    My question is: is fetch() the best method to work with APIs? either for vanilla and ReactJs?

    Omran kabo 200

    @Omrankabo

    Posted

    i appreciate the hard work you did in this challenge , all the work you did. but why there is nothing showing when the page first loaded . you can set an event listener to the window to display a random advice when the page loads.

    window.addEventListener("DOMContentLoaded", function () {
    advice_number.textContent = data.id;
    advice_description.textContent = data.advice;
    
    });
    

    Marked as helpful

    0
  • Omran kabo 200

    @Omrankabo

    Posted

    i appreciate the hard work you did in this challenge , all the work you did. but why there is nothing showing when the page first loaded . you can set an event listener to the window to display a random advice when the page loads. and you can add some css hovers to make it look fancy

    window.addEventListener("DOMContentLoaded", function () {
    advice_number.textContent = data.id;
    advice_description.textContent = data.advice;
    
    });
    
    1