Java Script


What is JavaScript

JavaScript is a loosely-typed client side scripting language that executes in the user's browser. JavaScript interact with html elements (DOM elements) in order to make interactive web user interface.
JavaScript implements ECMAScript standards, which includes core features based on ECMA-262 specification as well as other features which are not based on ECMAScript standards.

JavaScript Example

JavaScript can be used in various activities like data validation, display popup messages, handling different events of DOM elements, modifying style of DOM elements etc.

JavaScript History

In early 1995, Brendan Each from Netscape, took charge of design and implementation of a new language for non-java programmers to give access of newly added Java support in Netscape navigator.
Each eventually decided that a loosely-typed scripting language suited the environment and audience, web designers and developers who needed to be able to tie into page elements (such as forms, or frames, or images) without a bytecode compiler or knowledge of object-oriented software design. The dynamic nature of the language led to it being named "LiveScript" but was quickly renamed to "JavaScript" Know more about JavaScript history.

JavaScript Engine

JavaScript engine in the browser interprets, compiles and executes JavaScript code which is in a web page. It does memory management, JIT compilation, type system etc. Each browser includes different JavaScript engines. 

Browser
JavaScript Engine
Internet Explorer v9.0+
Chrome
V8
Firefox
JagerMonkey
Opera v 14+
V8
Safari
JavaScriptCore (Nitro)

JavaScript is different when compared to server side languages like Java and C#.

Advantages of JavaScript
  1. JavaScript is easy to learn.
  2. It executes on client's browser, so eliminates server side processing.
  3. It executes on any OS.
  4. JavaScript can be used with any type of web page e.g. PHP, ASP.NET, Perl etc.
  5. Performance of web page increases due to client side execution.
  6. JavaScript code can be minified to decrease loading time from server.
  7. Many JavaScript based application frameworks are available in the market to create Single page web applications e.g. Exit’s, AngularJS, Knockouts etc.

Setup Development Environment for JavaScript

In order to work with JavaScript, you need to install the following tools:
  1. Browser
  2. Editor
You can install any browser as per your preference e.g. Explorer, ChromeFirefoxSafariOpera etc. JavaScript works on any web browser on any OS.

Editor
You can write JavaScript code using a simple editor like Notepad. However, you can also install any open source or licensed IDE in order to get IntelliSense support for JavaScript and syntax error/warning highlighter e.g. Visual Studio, Astana, Eclipse etc.
Prefer an editor which has built-in features of IntelliSense support and syntax error highlighter for speedy development.
Online Editor
You can also use online editor to learn JavaScript e.g. plnkr.cojsfiddle.net or jsbin.com.

Post a Comment

0 Comments