Uncaught SyntaxError : Unexpected Token <
I used bracket text editor to write my code, and when I checked it using chrome dev tool it showed the message Uncaught SyntaxError : Unexpected Token <, which lead to the first line <! DOCTYPE html> What's the meaning of that? Is there anyone could give a hand to clarify? And This is the code I've written:
Thank you very much in advance.
Huy Bui13,329 Points
Looks like you have an extra space in your query for 'myHeading' -- document.getElementById( " myHeading" ).
// remove extra space const myHeading = document.getElementById( "myHeading" );
Hope this helps
Hey Hui Bui, Thank you very much for your help:) I am really a novice at programming, and never used jsfiddle before. I'll learn how to use that. Thank you for introducing me to jsfiddle:)
I've removed the white space, but the console still send the same error message. What I don't understand is, why I can still launch it using bracket's live preview, but when I tried to use console it sent the error message...What could be wrong?