+ 1
What does the message mean Uncaught SyntaxError?
Greetings to the whole community. Why every time I want to run a code appears the following message? Uncaught Syntax Error: Unexpected token < Line 1.
18 ответов
+ 21
Pedro Marcano Salazar.
Good now 1 last thing you have to do...
Just remove all the codes from "JS" tab (3rd tab)
Then it will work
+ 20
Pedro Marcano Salazar. Your welcome, sir
We are there to help you 😉
Happy coding 🤗
+ 19
If you don't mind share the code (or at least part of it)
We will check it for you😉
we are there to help you🤝
+ 19
Pedro Marcano Salazar. It won't accept HTML tags in the javascript section... That's why it says error
How to fix it:
1) remove all the codes from your javascript section
2) copy this and paste it inside body, in html (7th line)
👇copy 👇
<script>
document.write("Hello World!");
</script>
☝️copy☝️
+ 17
Mike Perkowski your welcome, sir
Is it working now?
+ 3
you wrote HTML in the JS tab ...
JavaScript doesn't recognise the HTML, so it gives an error message
+ 3
just remove everything which is HTML from the JS tab (basically anything that starst or ends with <>)
+ 1
because you probably have a < somewhere in your code which doesn't belong there or you havn't closed a bracket or something like that...
It would help alot if you shared the code your having trouble with ... otherwise thats all we could tell you...😅
By the way a Syntax Error is when your code is not written properly, like things are missing or at wrong places or shouldn't be where they are.😅
+ 1
just share your code in this thread ... 😅
+ 1
Daniel [#United We Stand🇮🇳] Great, thanks.
+ 1
0
Since I started I have had this problem. I have reviewed my codes and I can not find the error.
0
are you maybe using some sort of library or something like that, which you have acedentally opened perhaps edited?
0
Ok, thanks.
0
Daniel [#United We Stand🇮🇳] it worked but it warns of an error in line 2 >> https://code.sololearn.com/WA9TU09qgHXS/?ref=app
0
Daniel [#United We Stand🇮🇳] Now everything is in order. >> https://code.sololearn.com/WA9TU09qgHXS/?ref=app
Thank you very much for your help.
0
nice question