Methods and Properties of the Array Object : JavaScript DHTML examples (example source code) » Language Basics » Array

JavaScript DHTML










Java Products
Java Articles
JavaScript DHTML Home  »   Language Basics   » [  Array  ]   

 
Methods and Properties of the Array Object


/*
JavaScript Unleashed, Third Edition
by Richard Wagner and R. Allen Wyke 

ISBN: 067231763X
Publisher Sams CopyRight 2000


+---------+---------------+-----------------------------------------------------+
  Type      Item            Description
+---------+---------------+-----------------------------------------------------+
  Method
+---------+---------------+-----------------------------------------------------+
           concat()         Concatenates the elements passed into an existing array. 
                            This method was added in JavaScript 1.2.
+---------+---------------+-----------------------------------------------------+
           join()           Concatenates all elements of an array into one string.
+---------+---------------+-----------------------------------------------------+
           pop()            Deletes the last element of an array.
+---------+---------------+-----------------------------------------------------+
           push()           Adds elements to the end of an array.
+---------+---------------+-----------------------------------------------------+
           reverse()        Reverses the order of the elements in the array. 
                            This method was added in JavaScript 1.2.
+---------+---------------+-----------------------------------------------------+
           shift()          Deletes elements from the front of an array. This 
                            method was added in JavaScript 1.2.
+---------+---------------+-----------------------------------------------------+
           slice()          Returns a subsection of the array. This method was 
                            added in JavaScript 1.2.
+---------+---------------+-----------------------------------------------------+
            sort()          Sorts elements in array.
+---------+---------------+-----------------------------------------------------+
            splice()        Inserts and removes elements from an array. This 
                             method was added in JavaScript 1.2.
+---------+---------------+-----------------------------------------------------+
            toSource()      Converts elements to a string with square brackets. 
                            This method was added in JavaScript 1.3.
+---------+---------------+-----------------------------------------------------+
            toString()      Converts the elements in an array to a string.
+---------+---------------+-----------------------------------------------------+
           unshift()        Adds elements to the front of an array. This method 
                             was added in JavaScript 1.2.
+---------+---------------+-----------------------------------------------------+
           valueOf()        Returns an array of elements separated by commas.
+---------+---------------+-----------------------------------------------------+
 Property
+---------+---------------+-----------------------------------------------------+
           index            For an array created by a regular expression match, 
                            this property returns the indexed location of the match. 
                            This was added in JavaScript 1.2.
+---------+---------------+-----------------------------------------------------+
           input            For an array created by a regular expression match, 
                            this property returns the original string. This was 
                            added in JavaScript 1.2.
+---------+---------------+-----------------------------------------------------+
           length           The number of elements in the array.
+---------+---------------+-----------------------------------------------------+
           prototype        Provides the capability for a programmer to add 
                            properties to instances of the Array object. 
                            This property was added in JavaScript 1.1.
+---------+---------------+-----------------------------------------------------+
*/
Related examples in the same category
1.  Demo all methods in Array
2.  Assing array value inside function
3.  Simple Array Demo
4.  Array loop, find:Control array : Two dimension array
5.  Reversing, Sorting, and Concatenating an Array
6.  Custom Numeric Comparison for the Array.Sort Method
7.  Case-Insensitive Comparison for the Array.Sort Method
8.   Iterating Through a Sparse Array
9.  Using Functions to Iterate Through an Array
10.  Reading and Writing Array Elements
11.  Array with a numeric parameter and assign data to it
12.  A string array
13.  Array - properties and methods:length, join, reverse, push,pop,shift
14.  Array - sort()
15.  Array - concat and slice
16.  Array - splice
17.  Displaying the Contents of an Array
18.  Using the Array.join() Method
19.  Using JavaScript Arrays
20.  Extending the Length of an Array
21.  An Array within an Array
22.  Using the Methods of the Array object
23.  Array.sort() Possibilities
24.  Array.reverse() Method
25.   Array Concatenation
26.  A Looping Array Lookup
27.  A Simple Parallel Array Lookup
28.  Adding a prototype Property
29.  Two-Dimensional Array Work Around
30.  Array definition and iteration
31.  Reference an Array by index
32.  URL Array
33.  Array Utility functions
34.  Dynamic array








Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.