A Array.shift() (Method) Example code: // Create (Web hosting e commerce)
Tuesday, May 8th, 2007A Array.shift() (Method) Example code: // Create an array and test the Array.shift() method myArray = new Array(”AAA”, “BBB”, “CCC”); document.write(”Array
“) displayArrayAsTable(myArray); document.write(”Array.shift()
“) document.write(myArray.shift()) document.write(”
“) document.write(”
“) document.write(”Array after shift() 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.prototype, Array.unshift(), Queue manipulation, Stack manipulation Cross-references: ECMA 262 edition 3 section 15.4.4.9
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision best web hosting services