Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialpikktorr
6,606 Points"let statusHTML=" did not work
I tried with the let keyword, the widget didn't show up and it gave me this error:
"Uncaught ReferenceError: statusHTML is not defined".
Then I used var, it works, but there's still an error:
"Uncaught TypeError: Cannot set property 'innerHTML' of null"
What am I missing?
2 Answers
pikktorr
6,606 PointsSomehow it worked the next day, maybe VS Code needed a restart. Thanks for the answer!
Steven Parker
231,172 PointsThe problem causing "Uncaught TypeError: Cannot set property 'innerHTML' of null" is that the code on left side of that assignment is not finding the element.
To be able to pin it down more specifically, we'd need to see the actual code, preferably in a workspace snapshot.
Steven Parker
231,172 PointsSteven Parker
231,172 PointsViktor Rozgonyi — Glad to help, but normally you'd mark the answer that helped you as "best answer".