JavaScript : Core Objects
List of JavaScript core objects
Name of the object Version
Array Object Implemented in JavaScript 1.1
Boolean Object Implemented in JavaScript 1.1
Date Object Implemented in JavaScript 1.0
Function Object Implemented in JavaScript 1.1
Java Implemented in JavaScript 1.2
JavaArray Implemented in JavaScript 1.1
JavaClass Implemented in JavaScript 1.1
Java Implemented in JavaScript 1.1
JavaPackage Implemented in JavaScript 1.1
Math Object Implemented in JavaScript 1.0
netscape Implemented in JavaScript 1.1
Number Object Implemented in JavaScript 1.1
Object Implemented in JavaScript 1.0
Packages Implemented in JavaScript 1.1
RegExp Object Implemented in JavaScript 1.2
String Object Implemented in JavaScript 1.0
sun Implemented 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.
List of JavaScript core objects
Name of the object | Version |
---|---|
Array Object | Implemented in JavaScript 1.1 |
Boolean Object | Implemented in JavaScript 1.1 |
Date Object | Implemented in JavaScript 1.0 |
Function Object | Implemented in JavaScript 1.1 |
Java | Implemented in JavaScript 1.2 |
JavaArray | Implemented in JavaScript 1.1 |
JavaClass | Implemented in JavaScript 1.1 |
Java | Implemented in JavaScript 1.1 |
JavaPackage | Implemented in JavaScript 1.1 |
Math Object | Implemented in JavaScript 1.0 |
netscape | Implemented in JavaScript 1.1 |
Number Object | Implemented in JavaScript 1.1 |
Object | Implemented in JavaScript 1.0 |
Packages | Implemented in JavaScript 1.1 |
RegExp Object | Implemented in JavaScript 1.2 |
String Object | Implemented in JavaScript 1.0 |
sun | Implemented in JavaScript 1.1 |
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
Name Description Version
constructor Specifies the function which creates an object's prototype. Implemented in JavaScript 1.2
index The position of a regular expression match within a string. Implemented in JavaScript 1.2
input Contains the original string against which the regular expression was matched. Implemented in JavaScript 1.2
length Returns the number of elements in an array Implemented in JavaScript 1.2
prototype Use to add new properties to all objects. Implemented in JavaScript 1.2
Javascript Array Objects Methods
Name Description Version
concat Use to join two or more arrays and returns a new array. Implemented in JavaScript 1.2
join Use to join all elements of an array into a string. Implemented in JavaScript 1.2
pop Use to remove the last element from an array. Implemented in JavaScript 1.2
push Use to add one or more elements at the end of an array. Implemented in JavaScript 1.2
reverse Use to reverse the order of the elements in an array. Implemented in JavaScript 1.2
shift Use to remove first element from an array. Implemented in JavaScript 1.2
slice Use to extract a section of an array. Implemented in JavaScript 1.2
splice Use to remove old elements and add new elements to an array. Implemented in JavaScript 1.2
sort Use to sort the elements of an array. Implemented in JavaScript 1.2
tosource Returns a string which represent the source code of the array. Implemented in JavaScript 1.2
tostring Returns a string represent the array and its elements. Implemented in JavaScript 1.2
unshift Use 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
valueof Returns the primitive value of an array. Implemented in JavaScript 1.2
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.
w3r[0] refers to php,
w3r[1] refers to html and
w3r[2] refers to css.
Javascript Array Objects Property
Name | Description | Version |
---|---|---|
constructor | Specifies the function which creates an object's prototype. | Implemented in JavaScript 1.2 |
index | The position of a regular expression match within a string. | Implemented in JavaScript 1.2 |
input | Contains the original string against which the regular expression was matched. | Implemented in JavaScript 1.2 |
length | Returns the number of elements in an array | Implemented in JavaScript 1.2 |
prototype | Use to add new properties to all objects. | Implemented in JavaScript 1.2 |
Javascript Array Objects Methods
Name | Description | Version |
---|---|---|
concat | Use to join two or more arrays and returns a new array. | Implemented in JavaScript 1.2 |
join | Use to join all elements of an array into a string. | Implemented in JavaScript 1.2 |
pop | Use to remove the last element from an array. | Implemented in JavaScript 1.2 |
push | Use to add one or more elements at the end of an array. | Implemented in JavaScript 1.2 |
reverse | Use to reverse the order of the elements in an array. | Implemented in JavaScript 1.2 |
shift | Use to remove first element from an array. | Implemented in JavaScript 1.2 |
slice | Use to extract a section of an array. | Implemented in JavaScript 1.2 |
splice | Use to remove old elements and add new elements to an array. | Implemented in JavaScript 1.2 |
sort | Use to sort the elements of an array. | Implemented in JavaScript 1.2 |
tosource | Returns a string which represent the source code of the array. | Implemented in JavaScript 1.2 |
tostring | Returns a string represent the array and its elements. | Implemented in JavaScript 1.2 |
unshift | Use 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 |
valueof | Returns the primitive value of an array. | Implemented in JavaScript 1.2 |
No comments:
Post a Comment