0

How to write first JavaScript

class MyClass { public static void main(String[ ] args) { System.out.println("Hello World"); } } what is wrong with this

28th Dec 2020, 7:27 AM
Rakesh Gorai
Rakesh Gorai - avatar
4 Respostas
+ 3
That example you wrote is Java, not Javascript. To transform it in js just use a console.log() Or document.write () Here an example that might be helpful : https://code.sololearn.com/WOqC2BQkGmTg/?ref=app
28th Dec 2020, 9:53 AM
Matthew
Matthew - avatar
+ 1
Follow the below link to learn about javascript. https://www.sololearn.com/Course/JavaScript/?ref=app Further, java syntax for printing hello world will not work in javascript. use: console.log("Hello World")
28th Dec 2020, 7:29 AM
Art1mis
0
try it on like that String args[] String []args
28th Dec 2020, 7:29 AM
{H}asintha Ranaweera
{H}asintha Ranaweera - avatar
0
Just write..console.log("statement")
2nd Sep 2021, 1:53 PM
SOUNTHERYA M