Method | NS2 | NS3 | NS4 | NS6 | IE3a | IE3b | IE4 | IE5 | IE5.5 | IE6 |
concat | | | x | x | | | x | x | x | x |
| Returns: Array object |
| This method concatenates (joins) two arrays together and returns the result. |
| Syntax: array1 .concat( array2 ) . |
join | | x | x | x | | x | x | x | x | x |
| Returns: String |
| This method returns a string holding all the elements of an array joined together, separated by a separator string. |
| Syntax: array .join( separator ) , where separator is the separator string you want to appear between elements in the returned string. |
pop | | | x | x | | | | | x | x |
| Returns: Array entry |
| This method "pops" the array by removing the last element from an array and returning it. See "Pushing and Popping" in this chapter. |
| Syntax: array .pop() . |
push | | | x | x | | | | | x | x |
| Returns: Array entry |
| This method "pushes" a new element or elements onto an array by appending them to the end of the array and returning the new length of the array. |
| Syntax: array .push( item1 [, item2 ... [, itemN ]]) . See "Pushing and Popping" in this chapter. |
reverse | | x | x | x | | x | x | x | x | x |
| Returns: Array object |
| This method returns the array with the order of the elements reversed . |
| Syntax: array .reverse() . |
shift | | | x | x | | | | | x | x |
| Returns: Array entry |
| This method removes the first element of an array and returns that element. |
| Syntax: array .shift() . |
slice | | | x | x | | | x | x | x | x |
| Returns: Array object |
| This method returns a slice, or section, of an array. |
| Syntax: array .slice( start , end ) ; where start is the beginning index of the slice, and end is the ending index of the slice. |
sort | | x | x | x | | x | x | x | x | x |
| Returns: Array object |
| This method sorts an array. |
| Syntax: array .sort([ function ]) ; where function is a function that returns a negative value if the first argument passed to it is less than the second argument (according to the way you want to sort the items), zero if the two arguments are equal, and a positive value if the first argument is greater than the second argument. If you omit function , the array is sorted in ascending text order. See "Sorting Arrays" in this chapter. |
splice | | | x | x | | | | | x | x |
| Returns: Array object |
| This method removes elements from an array and can also insert new elements. This method returns the deleted elements. |
| Syntax: array .splice( start , count [, item1 [, item2 [, ... [, itemN ]]]]) ; where start is the location at which to start deleting elements, count is the number of elements to delete, and item1 to itemN are elements to insert to replace the deleted elements. |
toLocaleString | | | | x | | | | | x | x |
| Returns: String |
| This method returns the array in locale-sensitive string form. |
| Syntax: array .toLocaleString() . |
toString | | x | x | x | | x | x | x | x | x |
| Returns: String |
| This method returns the array in string form. |
| Syntax: array .toString() . |
unshift | | | x | x | | | | | x | x |
| Returns: Array entry |
| This method returns the array with the given elements inserted at the beginning. |
| Syntax: array .unshift(([ item1 [, item2 [, ... [, itemN ]]]]) , where item1 to itemN are elements to insert at the start of the array. |