0
Some Values are considered undefined.
It is all good at the moment except after the line 99 of the js code where the comment "// Third Line" is written , that is where the problem is. https://code.sololearn.com/Wce9ZJc59lQ5/?ref=app
2 Réponses
+ 3
Your problem is at line 101 (arrow function) either get rid of the curly brackets or add a return statement.
jic Im viewing this via my pc
+ 5
Read the error message again. It is *way* before line 99.
JavaScript gets interpreted before the page loads, so no elements exist yet, and any reference to them gives this error.
Wrap the whole JS section in a window.onload event, like:
window.onload=function(){
<Code>
}