+ 1

Guys I tried to write my code in visual studio and it worked but in sololearn's code playground it doesn't work?

This was code was supposed to be an online Text editor https://code.sololearn.com/Wlw48MXzaSAi/?ref=app

7th Feb 2022, 3:14 AM
Dream
Dream - avatar
3 odpowiedzi
+ 2
The closing script tag that is part of the string on line 4, js tab, is being misread as the closing tag for the overall script that encompass all of the content in the js tab. Hence the reason for the errant text you see in the playground output, which is all of the code after line 4. Escaping the less than signs an forward slash of the script tags on line 4 will resolve you problem. https://code.sololearn.com/W6yH8Zf7OYzG
7th Feb 2022, 7:24 AM
ODLNT
ODLNT - avatar
+ 1
G'day miss/mr/alternative Dream the code playground is a protective environment for testing code projects. It doesn't have everything (and perhaps that is a good thing!).
7th Feb 2022, 4:14 AM
HungryTradie
HungryTradie - avatar
+ 1
Remove script element
7th Feb 2022, 4:14 AM
Atharv127
Atharv127 - avatar