JavaScript Array Functions
EditRocket provides the following information on Array functions in the JavaScript source code builder.
concat (arrayX,arrayX,......,arrayX) - Joins two or more arrays and returns the result
join (separator) - Puts all the elements of an array into a string
pop () - Removes and returns the last element of an array
push (newelement1,newelement2,....,newelementX) - Adds one or more elements to the end of an array and returns the new length
reverse () - Reverses the order of the elements in an array
shift () - Removes and returns the first element of an array
slice (start,end) - Returns selected elements from an existing array
sort (sortby) - Sorts the elements of an array
splice (index,howmany,element1,.....,elementX) - Removes and adds new elements to an array
toSource () - Represents the source code of an object
toString () - Converts an array to a string and returns the result
unshift(newelement1,newelement2,....,newelementX) - Adds one or more elements to the beginning of an array and returns the new length
valueOf () - Returns the primitive value of an Array object