1// 1. Using console.log()
2console.log("Hello World");
3// console.log() is used in debugging the code.
4
5// 2. Using alert()
6alert("Hello, World!");
7// // The alert() method displays an alert box over the current window with the specified message.
8
9// 3. Using document.write()
10document.write("Hello, World!");
11// // document.write() is used when you want to print the content to the HTML document.