Thursday, 28 February 2013

Java Script Core Objects


JavaScript : Core Objects

List of JavaScript core objects

Name of the objectVersion
Array ObjectImplemented in JavaScript 1.1
Boolean ObjectImplemented in JavaScript 1.1
Date ObjectImplemented in JavaScript 1.0
Function ObjectImplemented in JavaScript 1.1
JavaImplemented in JavaScript 1.2
JavaArrayImplemented in JavaScript 1.1
JavaClassImplemented in JavaScript 1.1
JavaImplemented in JavaScript 1.1
JavaPackageImplemented in JavaScript 1.1
Math ObjectImplemented in JavaScript 1.0
netscapeImplemented in JavaScript 1.1
Number ObjectImplemented in JavaScript 1.1
ObjectImplemented in JavaScript 1.0
PackagesImplemented in JavaScript 1.1
RegExp ObjectImplemented in JavaScript 1.2
String ObjectImplemented in JavaScript 1.0
sunImplemented in JavaScript 1.1
Please Google+Like this tutorial on FaceBook, Tweet, save it as bookmark andsubscribe with our Feed. Have suggestions? comment using Disqus down this page. Thanks.



Javascript Array Objects - Properties and Methods


Description

An Array is used to store a number of values (called as elements) in order with a single variable.
Can be created using javascript array object constructor.
new Array(size)
new Array(element0, element1, ..., elementN)

Parameters

size : The length of the array. If the value specified is not a number, an array of length 1 is created, with the first element having the specified value. The maximum length allowed for an array is 4,294,967,295.
element0,element1,...., elementN : A list of values for the array's elements

Example

w3r = new array ("php","html","css"); creates an array.
w3r[0] refers to php,
w3r[1] refers to html and
w3r[2] refers to css.

Javascript Array Objects Property

NameDescriptionVersion
constructorSpecifies the function which creates an object's prototype.Implemented in JavaScript 1.2
indexThe position of a regular expression match within a string.Implemented in JavaScript 1.2
inputContains the original string against which the regular expression was matched.Implemented in JavaScript 1.2
lengthReturns the number of elements in an arrayImplemented in JavaScript 1.2
prototypeUse to add new properties to all objects.Implemented in JavaScript 1.2

Javascript Array Objects Methods

NameDescriptionVersion
concatUse to join two or more arrays and returns a new array.Implemented in JavaScript 1.2
joinUse to join all elements of an array into a string.Implemented in JavaScript 1.2
popUse to remove the last element from an array.Implemented in JavaScript 1.2
pushUse to add one or more elements at the end of an array.Implemented in JavaScript 1.2
reverseUse to reverse the order of the elements in an array.Implemented in JavaScript 1.2
shiftUse to remove first element from an array.Implemented in JavaScript 1.2
sliceUse to extract a section of an array.Implemented in JavaScript 1.2
spliceUse to remove old elements and add new elements to an array.Implemented in JavaScript 1.2
sortUse to sort the elements of an array.Implemented in JavaScript 1.2
tosourceReturns a string which represent the source code of the array.Implemented in JavaScript 1.2
tostringReturns a string represent the array and its elements.Implemented in JavaScript 1.2
unshiftUse to add one or more elements to the beginning of an array and returns the new length of the array.Implemented in JavaScript 1.2
valueofReturns the primitive value of an array.Implemented in JavaScript 1.2

No comments:

Post a Comment