0
Code playground unexpected token line 1
Hi! I've tried even copy pasting the right code depicted in the activity but I keep getting "uncaught syntax error:unexpected token in line 1" message when I run it on the code playground. What am I doing wrong? Thanks!!
3 Respostas
+ 5
[Editted, assuming you're referring to the public code on your profile]
The JS section is for Javascript.
Remove the HTML code that you have placed there.
So, the JS tab should only have this line:
document.write("Hello World!");
OR
You can add:
<script> // The JS code </script>
In the body on the html tab.
+ 5
Write only Javascript Code in the JS tab.
0
Thank you very much for your help! That was it. Just getting started with javascript, hopefully I'll be have more ellaborate questions soon. :)