Vous êtes sur la page 1sur 2

JAVA SCRIPT

JavaScript is an interpreted computer form and respond to user events such as


programming language. It was originally mouse clicks, form input, and page navigation.
implemented as part of web browsers so that
client-side scripts could interact with the user, • Server-side JavaScript extends the
control the browser, communicate core language by supplying objects relevant to
asynchronously, and alter the document running JavaScript on a server. For example,
contents. Nowadays, JavaScript has become server-side extensions allow an application to
very useful in both game development and communicate with a relational database,
provide continuity of information from one
the creation of desktop applications.
invocation to another of the application, or
JavaScript was developed in 1995 by Brendan perform file manipulations on a server.
Eich, at Netscape, and first released with
Netscape 2 early in 1996. It was initially called Applications
as LiveScript, but was renamed as JavaScript • Developing multimedia applications
in order to capitalize the popularity of Sun
Microsystem's Java language. JavaScript's use The users can use JavaScript to add
in applications outside of web pages also like multimedia elements. With JavaScript you can
in PDF documents, site-specific browsers, and show, hide, change, resize images and create
desktop widgets and other useful images rollovers. You can create scrolling text
applications. across the status bar, thus making multimedia
applications more interactive.
What is JavaScript?
• Create pages dynamically
JavaScript is a cross-platform, object-oriented
scripting language. JavaScript is a small, Based on the user’s choice, the date or other
lightweight language. It is not useful as a external data, JavaScript can produce pages
standalone language, but is designed for easy that are customized to the user.
embedding in other products and
• Interact with the user
applications, such as web browsers. Inside a
host environment, JavaScript can be JavaScript can do some processing of forms
connected to the objects of its environment and can validate user input when the user
to provide programmatic control over them. submits the form.
Core JavaScript contains a core set of objects • JavaScript objects are similar to
such as Array, Date, Math, and a core set of dictionaries
language elements such as operators, control
structures, and statements. Core JavaScript In JavaScript, objects are just collections of
can be extended for a variety of purposes by name-value pairs. JavaScript objects are
supplementing it with additional objects. considered as a dictionary with string keys.
The users can get and set the properties of an
• Client-side JavaScript extends the core object using either the familiar "." (dot)
language by supplying objects to control a operator, or the "[ ]" operator, which is
browser (Navigator or another web browser) typically used when dealing with a dictionary.
and its Document Object Model (DOM). For
example, client-side extensions allow an
application to place elements on an HTML
Features of JavaScript it relies on the environment to provide the
ability to include/import scripts (e.g. HTML
• Browser support <script> elements). This is not a language
All browsers have accepted JavaScript as a feature as such but it is common in most
scripting language and provide integrated JavaScript implementations.
support for it. For example, to access flash
Vendor-specific extensions
content, you need to install flash plug-in in
your browser. But to use JavaScript, you don't JavaScript is officially managed by Mozilla
have to use any plug-in at all. Foundation, and new language features are
added periodically. However, only some
JavaScript engines support these new
• JavaScript can be used on client side features.
as well as on server side
Object based Features Supported by
JavaScript has access to Document Object
JavaScript
Model DOM of browser. You can change the
structure of web pages at runtime. Thus, JavaScript supports various features related to
JavaScript can be used to add different effects object based language and JavaScript is
to WebPages. On the other hand, JavaScript sometimes referred to as an object-based
could be used on the server side as well. programming language. Some robust features
which JavaScript supports related to object
• Functional programming language
based are as follows:
In JavaScript, function could be assigned to
Object Type
variables just like any other data types. A
function can accept another function as a JavaScript supports the development of object
parameter and can also return a function. You types and in this context JavaScript supports
can have functions with no name as well. This both predefined and user-defined objects. It is
provides you the ability to code in functional possible to assign objects of any type to any
programming style. variable. It is possible to instantiate the
defined object types to create object
• Support for objects instances in JavaScript, which is a very
JavaScript is an object oriented language. powerful feature of Object based language.
However, the way JavaScript handles objects
and inheritance is bit different from
conventional object oriented programming
languages like C++/ Java. JavaScript supports
most of the object oriented concepts while
being simple to learn and use.

Run-time environment

JavaScript typically relies on a run-time


environment (e.g. in a web browser) to
provide objects and methods by which scripts
can interact with "the outside world". In fact,

Vous aimerez peut-être aussi