alert("Hello World") code example
Example 1: Javascript how to run hello world
var msg = "hello world";
console.log(msg);
Example 2: hello world javascript
// Output Hello World! in the console.
console.log("Hello World!");
Example 3: javascript hello world
alert("Hello world");