Javascript Overview

History

JavaScript was first developed by Brendan Eich while working for Netscape Communications Corporation. In the competition with Microsoft, Netscape considered their client-server providing a spread OS with a portable version of Sun Microsystems’s Java offering an environment in which applets could run. At the time C++ was being used and JavaScript became the competitor of C++ and aimed the professional programmers. It was developed as the name Mocha at first and was named LiveScript in its beta releases in September 1995. It was given the name Java Script when it was deployed in the Netscape browser version 2.0B3. It was misconnected to C—developed by Nombas, but Brendan had never heard the language C—when he developed LiveScript. Netscape also brought an operation of the language for server-side scripting with Netscape Enterprise Server in 1994 after releasing JavaScript for browsers. After gaining programmers attention, Microsoft introduced JavaScript support in its web browser named Internet Explorer in August 1996. Microsoft also promoted the webpage scripting using umbrella term Dynamic HTML. They replaced the name to Jscript to avoid trademark issues and added new date methods to fix the Y2K-problematic methods in JavaScript.

Netscape submitted JavaScript to Ecma International for consideration as an industry standard in November 1996 and was named ECMAScript. ECMA-262 specifications were published by Ecma International in 1997 but later some alterations were made to adapt it to the ISO/IEC-16262 standard and its second version was released. The current edition of the ECMAScript is 5.1 and was released in June 2011. While all of others were taking place, open source and developer communities worked to revolutionize JavaScript. The community effort was brought to life in 2005 when Jesse James Garett published a white paper in which he coined the term Ajax and specified a set of technologies which had JavaScript as its backbone. The process brought a output in a renaissance period of JavaScript usage headedby open source libraries and the communities that formed around them, with libraries like Prototype, Dojo, jQuery and Mootols. Now, JavaScript has directed to a new and exciting cycle of evolution with new developments such as the Nodejs platform.

Introduction

JavaScript is a dynamic computer programming language which is categorized as a prototype-based scripting language. It can be included on web pages to make them more interactive and can be used to modify the contents of forms, open new windows, change images and write dynamic page content. It can also be used with CSS to make DHTML; Dynamic HyperTextMarkup Language which permits to make parts of your web pagesappear, disappear or move around the page. JavaScripts are only implemented on the webpages on the browser window at any assigned time and when the user stops viewing the page, the scripts are instantly stopped. JavaScript can be used to interact with the user, command the browser, modify the contents and communicate asynchronously.

JavaScript and Java are not related and have separate semantics. JavaScript is also used in environments that aren’t web based too. It can be used in PDF documents, desktop widgets and site-specific browsers. JavaScript is a client side, interpreted, object oriented, high level scripting language.

Features

The features of JavaScript are listed below:

Imperative and Structured

Most of the structured programming from C is supported by JavaScript and has only one partial exception, scoping. It makes a distinction between expressions and statements among which one syntactic difference from C is automatic semicolon insertion which permits the semicolons that would normally eliminate statements to be lost.

Dynamic Typing

The types of JavaScript are related with values rather than variables.

 Object based

JavaScript is mostly object based and these objects are relative arrays, amplified with prototypes. The object property names are string keys and support two equivalent syntaxes; dot notation and bracket notation

Functional

Functions are first class and are objects having properties and methods. When the outer function is appealed, a nested function is created and each created function forms a lexical closure.

Prototype based

  1. Prototypes: JavaScript uses prototypes and makes it possible to pretend many class based features.
  2. Functions as object constructors: Function double as object constructors along with their characteristic role. The property of constructor’s prototype controls the object used for new object’s internal prototype. New methods are added by altering the prototype of the function as constructors.
  3. Functions as methods: Function and method have the same definition and the distinction occurs during function calling and when a function is called as a method of an object.

Implicit and explicit delegation: JavaScript is a delegation language and can be used as:

  1. Functions as Roles: Function-based implementations of role patterns like Traits and Mixins are supported by JavaScript and describe extra performance by at least one method bound to the keyword within its body.
  2. Object Composition and Inheritance: Implicit delegation happens automatically every time in the prototype chain is walked. This delegation is covered by automatism that is certain to the prototype property of constructor functions
JavaScript Basic Example:
HTML Document (overview.html)
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8"/>
    <title>CP Tutorials</title>
    <script>
        function demo(){
            var a = 15.5;
            var b = 10;
            var c = a + b;
            document.getElementById("first").innerHTML=a;
            document.getElementById("second").innerHTML=b;
            document.getElementById("sum").innerHTML=c;
        }
    </script>
</head>
<body onload="demo()">
<p>First Number:<span id="first"></span></p>
<p>Second Number:<span id="second"></span></p>
<p>Sum of Two Numbers: <span id="sum"></span></p>
</body>
</html>

Find JavaScript Reference

All the related necessary reference like functions, loops, array and many others are clearly, simply and completely kept by the www.followtutorials.com team.

See JavaScript reference

Find JavaScript forum

People obvious can have various corner core questions on related subject matter. We heartily welcome you to put your genuine question here in our forum section regarding JavaScript. We will try our best to extend solution on your problems.

See JavaScript forum

Find JavaScript article

We are able to take question from users on forum section similarly; users are allowed to put their ideas and views regarding to the subject JavaScript in article section. We hope all the latest and recent update will get posted by our visitors which can be great knowledge hub to us and our visitors.

See JavaScript article