/*
Learn How to Program Using Any Web Browser
by Harold Davis
Apress CopyRight 2004
ISBN: 1590591135
*/
<HTML>
<HEAD>
<TITLE>
Array methods
</TITLE>
<HEAD>
<BODY>
<H1>
<SCRIPT>
var theArray = new Array("Neo","Morpheus","Trinity","Mr. Smith");
document.write ("Original array: " + theArray);
document.write ("<br>");
theArray.reverse();
document.write ("Reversed array: " + theArray);
document.write ("<br>");
theArray.sort();
document.write ("Sorted array: " + theArray);
document.write ("<br>");
document.write("Concatenated: " + theArray.concat("Cypher", "Mouse"));
</SCRIPT>
</H1>
</BODY>
</HTML>
|