Vous êtes sur la page 1sur 11

Introduction to

SpringPeople Software Private Limited, All Rights Reserved.

What is Javascript?
JavaScript adds interactivity to HTML pages.
JavaScript is a lightweight scripting
programming language.
A JavaScript is usually embedded directly into
HTML pages.
JavaScript is an interpreted language. The
scripts execute without preliminary compilation.
No License is required to use Javascript
SpringPeople Software Private Limited, All Rights Reserved.

JavaScript Functions
A JavaScript function is a block of code designed to perform a
particular task.
A JavaScript function is executed when "something" invokes it
(calls it).
A JavaScript function is defined with the function keyword,
followed by a name, followed by parentheses ().
Function names can contain letters, digits, underscores, and
dollar signs (same rules as variables).
The parentheses may include parameter names separated by
commas: (parameter1, parameter2, ...)
The code to be executed, by the function, is placed inside
curly brackets: {}
SpringPeople Software Private Limited, All Rights Reserved.

Closures In Javascript
A closure is an inner function that has access to the outer
(enclosing) functions variablesscope chain. The closure has
three scope chains: it has access to its own scope (variables
defined between its curly brackets), it has access to the outer
functions variables, and it has access to the global variables.
The inner function has access not only to the outer functions
variables, but also to the outer functions parameters. Note
that the inner function cannot call the outer
functions argumentsobject, however, even though it can call
the outer functions parameters directly.

SpringPeople Software Private Limited, All Rights Reserved.

Object-Oriented JavaScript
Object Oriented Programming (OOP) refers to using self-contained
pieces of code to develop applications. We call these self-contained
pieces of code objects, better known as Classes in most OOP
programming languages and Functions in JavaScript. We use
objects as building blocks for our applications. Building applications
with objects allows us to adopt some valuable techniques,
namely, Inheritance (objects can inherit features from other
objects), Polymorphism (objects can share the same interface
how they are accessed and usedwhile their underlying
implementation
of
the
interface
may
differ),
and Encapsulation (each object is responsible for specific tasks).

SpringPeople Software Private Limited, All Rights Reserved.

JavaScript Data Types


One of the most fundamental characteristics of a programming
language is the set of data types it supports. These are the type of
values that can be represented and manipulated in a programming
language.
JavaScript allows you to work with three primitive data types:
Numbers eg. 123, 120.50 etc.
Strings of text e.g. "This text string" etc.
Boolean e.g. true or false.
JavaScript also defines two trivial data types, null and undefined, each
of which defines only a single value.
In addition to these primitive data types, JavaScript supports a
composite data type known as object.
SpringPeople Software Private Limited, All Rights Reserved.

JavaScript Variables
Like many other programming languages, JavaScript has
variables. Variables can be thought of as named containers.
You can place data into these containers and then refer to the
data simply by naming the container.
The scope of a variable is the region of your program in which
it is defined. JavaScript variable will have only two scopes.
Global Variables: A global variable has global scope which
means it is defined everywhere in your JavaScript code.
Local Variables: A local variable will be visible only within a
function where it is defined. Function parameters are always
local to that function.

SpringPeople Software Private Limited, All Rights Reserved.

JavaScript templates
Javascript templates are rendered and cached client-side
without sending an HTTP request to the server in other
words, theyre lightning fast.
An alternative approach to XUL's own templating system is to
use JavaScript templates.
This approach also provides a separation of formatting and
structure from content, but relies on a JavaScript templating
engine to have JavaScript-side business logic inject content
into a template. And this does not require any use of
RDF/XML, etc.

SpringPeople Software Private Limited, All Rights Reserved.

How you can master Javascript?


Become an expert in 2 days.
World class Javascript training by the industry experts.

More Details

SpringPeople Software Private Limited, All Rights Reserved.

Suggested Audience & Other Details


Suggested Audience - Web developer who wants to build
best-of-breed web UIs with the simplicity and elegance of
JavaScript.
Duration 2 Days
Prerequisites
Web development experience with HTML, CSS, JavaScript and jQuery
Exposure to any server technology (J2EE, .NET, Ruby etc)

Syllabus

SpringPeople Software Private Limited, All Rights Reserved.

For further info/assistance contact


training@springpeople.com
+91 80 656 79700
www.springpeople.com

Our Partners

SpringPeople Software Private Limited, All Rights Reserved.

Vous aimerez peut-être aussi