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

Submitted

Advice Generator App

Dasu Rahul 200

@dasurahul

Desktop design screenshot for the Advice generator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
2junior
View challenge

Design comparison


SolutionDesign

Community feedback

@zougari47

Posted

Hi there👋,

if you notice while clicking the button the quote doesn't change, this is how you can fix it

const getAdvice = () => {
  fetch("https://api.adviceslip.com/advice", {
  cache: 'no-cache'
})
    .then((response) => response.json())
    .then((data) => {
      id.innerHTML = data.slip.id;
      advice.innerHTML = data.slip.advice;
    });
};

Happy coding

Marked as helpful

0

Dasu Rahul 200

@dasurahul

Posted

@zougari47 Thanks Ahmed

0

Please log in to post a comment

Log in with GitHub
Discord logo

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