console.log("Hello World");
//This is a backend process you can see when you go to the console page in inspect panel and executing the code.
alert("Hello World"); //Or window.alert();
//This will show a dialog containing Hello World.
document.write("Hello World");
//This is the common way of displaying text content in a Web page using JS.