Design comparison
Solution retrospective
i cant figure out how to change advice# along with the advice text can anyone help me out? Do give your feedback #firstapiproject
Community feedback
- @jgengo-altPosted over 2 years ago
Hello there 👋
Your assignment looks great 🐱🔥
So to reply your question on how to actually change the id here are some hints that could help you:
You already have an
id
for your textadvice #X
, I would suggest a different name though likeadvice_id
instead ofid
<p id="advice_id">Advice #1</p>
So you can
const adviceId = document.querySelector("#advice_id"); const advice = adviceData.slip; adviceId.innerHTML = `Advicce #${advice.id}`
You can take a look at my assignment javascript, it could help you to understand here
Keep going 💪
Don't hesitate to follow me, I will follow back and give you advice for your future assignments if you are interested 🌱
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