A Array.push() (Method) (Free web hosting with ftp) The value is added
A Array.push() (Method) The value is added to the end of the array. If the value is an array itself, it is not flattened. When it is eventually popped, you get the array back. If several values are passed to the push() method, they will all be added to the stack, but only the last one will be returned. This modifies the receiving array, increasing the array length by the number of elements that were pushed onto the end. The result of this method is the new length of the receiving array after the pushed item has been concatenated onto its tail. Example code: // Create an array and test the Array.push() method myArray = new Array(”AAA”, “BBB”, “CCC”); document.write(”Array
“); displayArrayAsTable(myArray); document.write(”Array.push()
“) document.write(myArray.push(”XXX”)); document.write(”
“); document.write(”Array after push(’XXX’) call
“); displayArrayAsTable(myArray); // Display an array in a table function displayArrayAsTable(anArray) { myLength = anArray.length; document.write(”
| “); document.write(myIndex); document.write(” | “); document.write(anArray[myIndex]); document.write(” |
“) } See also: Array.pop(), Array.prototype, Array.unshift(), Queue manipulation, Stack manipulation Cross-references: ECMA 262 edition 3 section 15.4.4.7
Note: If you are looking for high quality webhost to host and run your jsp application check Vision florida web design services