What is Javascript

javascript tutorial
Javascript Tutorial for Web Developers

Javascript is prototype based, client-side scripting language of web developed by Netscape in 1995. Javascript is used to build interactive websites with dynamic features and to validate form data. HTML can only create structure, css can style html, but to add functionality, we need to use javascript. Unlike HTML and CSS, Javascript is Dynamic.

As per a survey in 2015, Javascript is Second Most Popular programming language in the world. First is Java.

Javascript Fast Facts

  • Javascript is client side scripting( i.e. browser interpreted) language.
  • JavaScript was designed to add interactivity to HTML pages.
  • Javascript is Object Based.
  • Javascript is Case Sensitive.
  • Javascript can put dynamic content into a HTML page.
  • Javascript can react to events like Click, mouse over, mouse out, form submit etc.
  • Javascript can validate form data.
  • Javascript can detect user browser.
  • Javascript can be used to create cookies.
  • Javascript can add cool animation to a webpage.
  • Javascript can detect user physical location using geolocation.
  • Javascript can also be used to draw shapes, graphs, create animations and games development using HTML5 Canvas.
  • At present, javascript has lot of libraries and framework, exp JQuery, Angular JS, React JS, Backbone JS etc, thus making Javascript more popular.
  • Javascript can also be used in developing server side application using Node JS.
  • One of the popular Code Editor Brackets is written in Javascript.

Javascript History

WWW was formed in 1990. Initially it was a bunch of web-pages linked together. But soon people want more interactive websites, so on demand of Netscape, Brenden Eich, (inventor of Javascript) invented a prototype based ( Classless) language for their Navigator Browser. Initially it was called "Livescript", but later on renamed as "Javascript".

The same time, Microsoft also invented JScript, the Microsoft's client side scripting language for their Internet Explorer 3. But JScript was meant for Internet Explorer only.

In 1998, ECMA standardised Javascript, not JScript. Thus Microsoft start using Javascript in Internet Explorer 4 and Javascript become popular.

In today's world, Javascript is the second most demanding technology.

Timeline of Javascript

Year Achievement
1991 HTML, WWW Formed
1995 CSS
1995 JAVASCRIPT
1998 JAVASCRIPT was standardised by ECMA
1998 DHTML( Html + Javascript)
2005 AJAX
2009 HTML5 ( Html + Css + Javascript)


Add Javascript to HTML

Javascript can be placed on both Head and Body tag of our HTML Page.
We can write script in head tag only when we want the script to be loaded before HTML Markup. For Exp, script for redirection or moved page, securities etc.
Rest all script like Jquery, Angular should be written just before body closing. This can load DOM Content first, then scripts will run, hence optimise webpage performance.

Javascript Code

Javascript in Head


<!DOCTYPE HTML>
<html>
<head>
<title>Javascript</title>
<meta charset="utf-8">
<script >

	// Write Script here

</script>
</head>
<body>
        // body content
</body>
</html>

Javascript in Body


<!DOCTYPE HTML>
<html>
<head>
<title>Javascript</title>
<meta charset="utf-8">
</head>
<body>
    // content in body

<script>

	// Write Script here

</script>
</body>
</html>

In HTML5, type and language attributes from script tag has been deprecated. So we can write javascript code directly in script tag.


Javascript Training in Noida

For Javascript classroom training in Noida Delhi NCR, click below

Javascript Training in Noida