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
- JavaScript
is easy to learn.
- It
executes on client's browser, so eliminates server side processing.
- It
executes on any OS.
- JavaScript
can be used with any type of web page e.g. PHP, ASP.NET, Perl etc.
- Performance
of web page increases due to client side execution.
- JavaScript
code can be minified to decrease loading time from server.
- 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:
- Browser
- Editor
You can install any browser as per
your preference e.g. Explorer, Chrome, Firefox, Safari, Opera 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.co, jsfiddle.net or jsbin.com.
0 Comments