0
How to write first JavaScript
class MyClass { public static void main(String[ ] args) { System.out.println("Hello World"); } } what is wrong with this
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
+ 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")
0
try it on like that
String args[]
String []args
0
Just write..console.log("statement")