In this Javascript programming example we will learn create first Javascript program to print "Hello world". There are different ways to print Hello World in Javascript
Print Hello World using alert()
alert() is a method used in Javascript to display messages as alert boxes on the current window.
example
<script> |
This will print the Hello World inside alert box on the current window.
Print Hello World using console.log()
This Javascript function will write the messages on the console, which we will used mostly while debug the applications.
|
Print Hello World using document.write()
This document.write() method will used to print the web content on the window we will use this method.
|
we learned what are the Javascript print functions and how to use theme inside Javascript code. We will learn more about Javascript example in the coming articles.