<html> <head> <title>Get the last element in an Array</title> <script language="javascript" type="text/javascript"> <!-- var x = new Array(2,3,4); alert(x[x.length-1]); //--> </script> </head> <body> </body> </html>