+ 1
Javascript
let countEl = document.getElementById("count-el"); console.log(countEl); let count = 0; function increment(){ count = count + 1; countEl.innerText = count; console.log(countEl.innnerText); } increment(); What's wrong here?
2 Antworten
+ 3
What error do you get? Describe it precisely.
Check the spelling of innerText.
Note that Javascript will only find the HTML element if it is already loaded in DOM.
0
the word "innnerText" is spelled wrong it's "innerText".