JavaScript - Write Program to Print Hello World!!!

JavaScript is scripting language which is similar to C. It is syntax and logic are similar to C, C++ and Java. But Java is completely different then JavaScript Keep in mind.

JavaScript has less features than the C, C++ like we don't have specialized pointer in in JavaScript because it is client side scripting programming language but we can use array to make different kinds of objects and similar variables.

There are many ways to show output, such as you can directly make variable or object (DOM) or document and you can pass the result. But here we are using another method which is alert dialog box.

HTML / JS Code

<html>
 <head><title>JavaScript</title></head>
 <body>
  <h1>Hello</h1>
   <script type='text/javascript'>
    alert('Hello World!');
   </script>
 </body>
</html>

Output

Alert Box
Alert Box