1. JavaScript: Introduction

Java script is a client side language, which means that javascript is embeded in your browser. Crome, FireFox and IE all known browsers support javascript.

JavaScript is web based language and it is only for web pages. You will write html files and will embed your javaScript code in html. To start working with JavaScript, You just need to know basic HTML and its enough for now.


Java vs JavaScript.

Its a very famous question that what is the similarity between Java and JavaScript and here is the answer.
JavaScript was developed in 1996 by a Netscape and they called it Live script.  To make this new scripting language popular Sun and Netscape were agreed to give new name to this scripting language and they agreed with name JavaScript. This is the only similarity between these two languages. For working with JavaScript, if you know Java or don’t it does not matter.


What tool do you need for this language.

Any text editor will work but here are some suggestions. If you are Mac user, you can use free tools like TextWrangler, Sublime Text.
Text Wrangler http://www.barebones.com/products/textwrangler/

If you are Windows user then my favourite tool is notepad++.
NotePad ++ https://notepad-plus-plus.org/


Hello World from javaScript

Lets start with quick example and try to find where is JavaScript. Open text editor of your choice and paste following text

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>Understand-Programming</title>
	</head>
	<body onload="alert('Hello World')">
		<h1> Welcome to Javascript</h1>
	</body>
</html>

save it with famous helloworld.html file and double click or drag it to the browser. You will see the popup message and here is javaScript hidden in your browser. This alert function is from javaScript.