@jgengo-alt
Posted
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 text advice #X
, I would suggest a different name though like advice_id
instead of id
<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 helpful