script tag with alert code example Example 1: javascript hello world console.log("Hello World!"); Example 2: javascript hello world alert("Hello world");