How to print Hello World in JavaScript?

To print Hello World in JavaScript, do this: console.log('Hello World').
console.log('Hello World');

console.log outputs to web browser's build-in console.

To see the output in Chrome web browser, click the three-dot menu in the top-right corner, then under More Tools click Developer Tools. In the opened panel, go to the Console tab to see your output.