11th May 2021, 1:51 PM
Raphael
4 Answers
+ 3
It's wrong because you are writing JavaScript code in Java. Just like car and carpet are different things Java and JavaScriprt are different things you try JavaScript on web, in web there is a section of Js or you can include script tag in HTML and even you can run JavaScript in JavaScript run time environment which will run your code in your machine instead of Browser that is Node js.
11th May 2021, 1:55 PM
Abhiyantā
Abhiyantā - avatar
+ 3
""https://code.sololearn.com/cHYw5QaDYReG/?ref=app"" See this code! Where to run and you can also run in web section
11th May 2021, 1:57 PM
Abhiyantā
Abhiyantā - avatar
0
Hello this is java compiler not javascript interpreter. Run you code in web section of sololearn.
11th May 2021, 1:53 PM
TOLUENE
TOLUENE - avatar
- 1
Ok thank you all that very help's
11th May 2021, 4:15 PM
Raphael