0

The code works the first two of the adding elements in works but not the last help?

else if (a === 12) { var thankyouTwo = document.createElement("h5"); thankYoutwo.id = thankouTwo thankyouTwo.innerHTML = "3: With Every Apple You Collect Helps Us Grow Stronger And Stronger!"; document.body.appendChild(thanyouTwo); }

30th May 2024, 2:51 PM
2 odpowiedzi
+ 1
It's hard to say. Can you read this guide and add your code? Also, maybe what you're expecting to happen.... https://sololearn.com/compiler-playground/Wek0V1MyIR2r/?ref=app
30th May 2024, 6:17 PM
Ausgrindtube
Ausgrindtube - avatar
0
Update I found the one inbetween upgradeOne and thankyouTwo is tbe problem whats the fix? else if (a === 10) { var upgradeOne = document.createElement("p"); upgradeOne.onclick = upgrade; upgradeOne.innerHTML = "2: Your Working So Hard Heres A Little Something To Help"; document.body.appendChild(upgradeOne); } else if (a >= 10) { a += 1; clicks.innerHTML = a; } else if (a === 12) { var thankyouTwo = document.createElement("p"); thankyouTwo.id = "thankyouTwo"; thankyouTwo.innerHTML = "3: With Every Apple You Collect Helps Us Grow Stronger And Stronger!"; document.body.appendChild(thankyouTwo); } }
30th May 2024, 3:06 PM