Web Technologies
Java Script Objects
Smt M.Jeevana Sujitha
Assistant Professor
Department of Computer Science and Engineering
SRKR Engineering College, Bhimavaram, A.P. - 534204
OBJECTIVES
The Objectives of this lecture are
Java Script Objects
of properties and
behaviors.
var name=“srinu”; document.write(name.length); document.write(name.toUpperCase());
Java Script Objects
Java Script Objects
Date object: This object is used for obtaining the date and time.
Java Script Objects
Methods of Date object:
time
from sun to sat
59.
999 based on local time.
Java Script Objects
Methods of Date object:
is from 0 to 6 i,e from sun to sat
to 23 based on UTC timing zone
timing zone.
Java Script Objects
String object: String is a collection of characters.
Methods:
Java Script Objects
Methods:
letters into lower case.
all lower case
letters into upper case.
Example:
var s1=“sri”; var s2=“nivas”;
document.write(s1.concat(s2)); document.write(s1.charAt(1)); document.write(s1.toUpperCase());
Java Script Objects
Boolean object: This is used when we want to represent true and false values.
Example:
var tmp=new Boolean(false);
Java Script Objects
Math object: This is used for performing mathematical computations.
Methods:
Java Script Objects
Methods:
Java Script Objects
Array object: In Java script array is treated as an object.
be referred by a common name.
Array Declaration:
object.
Syntax:
var arrname=new Array(size);
Example:
var a=new Array(5);
Initialization:
var a=new Array(10,20,30,40,50);
var a=[10,20,30,40,50];
THANK YOU