0
uncaught reference error
Can you guys help me with this code. Iām not sure what Iām doing wrong. I tried to execute the same code on my VS Studio and chrome console is giving me reference error saying āgreeting is not definedā why and how can I solve this error? https://code.sololearn.com/WzHpI5iPxJ2X/?ref=app
4 Answers
+ 5
You are missing closing brackets ("}") on both the testFunc() function and the else clause within it. Also, you need getElementById, not getElementsById.
+ 2
No problem Yamkela Mazwi šš
+ 1
much appreciated thank you
0
Mistake 1:You forgot 2 } at the end
Mistake 2: it's not getElementsById. It is getElementById.