First Getting The Value Then Getting Undefined Right After

Hello all,

I am trying to add a string to a certain element as innerText using JS DOM. But i can’t. When i console.log() the current value of the element, it first gives the current element text which is as expected but right after it gives undefined. I do not know why. Any opinions?

My goal is to state the winner to user. I am trying to do that on line 63-66-69 of JS.

You can find the code here → https://codepen.io/BGB37/pen/JjaQBvj?editors=0010

Hi @camperextraordinaire ,
I solved it i guess. I was trying to assing a value using İnnerText instead of innerText. After i corrected the typo everthing is working as expected.

Thank you for you time and interest.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.