Home Tutorial Javascript Javascriptbasics JavaScript Hello World

 
 

JavaScript Hello World
Posted on: November 6, 2009 at 12:00 AM
JavaScript Hello World: This is the first program in JavaScript, and you will learn how to run a simple program of JavaScript in a web browser

Hello World Program in JavaScript

To write and run a JavaScript program all we need to have a text file and a internet browser. First of all write the following code in a text file and save it with .html file, for now we will embed the JavaScript code within html coding, to display the output in  a browser.

Example 1:

<html>
<head>
<title>My Firt JavaScript File </title>
<script type="text/javascript" >
document.write("Hello World");
</script>
</head>
<body>
</body>
</html>

 

Output:

Hello World

Related Tags for JavaScript Hello World:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.