Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

JavaScript

No description
by

lolla sravani

on 20 January 2015

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of JavaScript

The Literals are as follows:
Language Elements
Programming with JavaScript
JavaScript
developed by Brendan Eich
What is JavaScript???
JavaScript is a programming language designed for
Web pages.
Why Use JavaScript?
JavaScript enhances Web pages with dynamic and
interactive features.
JavaScript runs in client software.
JavaScript 1.3 works with version 4.0 browsers.
JavaScript Syntax
JavaScript is case sensitive.
JavaScript is an object oriented programming
language
.
JavaScript is simple text (ASCII).
Variables
Literals
Operators
Control Structures
Functions
Objects
Arithmetic, comparison, assignment, bitwise, boolean (pretty much just like C++).

+ - * / % ++ -- == != > <
&& || ! & | << >>

Operators:
Example:
Control Structures
Functions:
Difference between Java &JavaScript:
JavaScript does not create applets or stand-alone applications.
Java is an OOP programming language while Java Script is an OOP scripting language.
Java code needs to be compiled while JavaScript code are all in text.
Objects:
A JavaScript object is an unordered collection of variables and
Objects are variables which can contain many values.
named values.
Creating a JavaScript Object:


There are different ways to create new objects:
Define and create a single object, using an object literal.
Define and create a single object, with the keyword new.
Define an object constructor, and then create objects of the constructed type.
Using an Object Literal:
Using an object literal, you both define and create an object in one statement.
An object literal is a list of name:value pairs (like age:50) inside curly braces {}.
Example
var person = {firstName:"John", lastName:"Doe", age:50, eyeColor:"blue"};

Using the JavaScript Keyword new:
Example:

var person = new Object();
person.firstName = "John";
person.lastName = "Doe";
person.age = 50;
person.eyeColor = "blue";
Using an Object Constructor:
Sometimes we like to have an "object type" that can be used to create many objects of one type.
The standard way to create an "object type" is to use an object constructor function:
Example
function person(first, last, age, eyecolor) {
this.firstName = first;
this.lastName = last;
this.age = age;
this.eyeColor = eyecolor;
}
var myFather = new person("John", "Doe", 50, "blue");
var myMother = new person("Sally", "Rally", 48, "green");

The above function (person) is an object constructor.
Once you have an object constructor, you can create new objects of the same type:

var myFather = new person("John", "Doe", 50, "blue");
var myMother = new person("Sally", "Rally", 48, "green");

The 'this' keyword
The value of 'this', when used in an object, is the object itself.

The 'this' keyword in an object constructor does not have a value. It is only a substitute for the new object.

The value of 'this' will become the new object when the constructor is used to create an object.
Note that 'this' is not a variable. It is a keyword. You cannot change the value of this.
The different types of
Objects
The Window Object
The math object
The Array object
The window Object
Represents the current window.

There are possible many objects of type Window, the predefined object window represents the current window.

Access to, and control of, a number of properties including position and size.
The Array Objects
Arrays are supported as objects.
Methods include:
Attribute length
concat join pop push reverse sort
The Math Object
Access to mathematical functions and constants.
Constants: Math.PI
Methods:
Math.abs(), Math.sin(), Math.log(), Math.max(),
Math.pow(), Math.random(), Math.sqrt(), …
Conditional Operators:
if...
if (conditional){ }
if...else...
if (conditional){ }
else{ }
if..else.. if..else..
if(conditional){ }
else if (condtional){ }
else{ }

Switch
switch (value){
case1:
case2:
default:
}
L.Sravani
G.Niveditha
A.Mrudula
K.Chandrika
By
JavaScript is an interpreted language.
http://www.w3schools.com
wikipedia
www.tutorialspoint.com
References:
The new key word
Full transcript