Design comparison
SolutionDesign
Community feedback
- @zougari47Posted over 2 years ago
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 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