Reverse the elements in an Array : Reverse « Array « JavaScript Tutorial





<html>
<head>
<title>Reverse an Array</title>

<script language="javascript" type="text/javascript">
<!--

var x = new Array(2,3,4);
x.reverse();
alert(x);

//-->
</script>

</head>
<body>

</body>
</html>










11.25.Reverse
11.25.1.Array.reverse()
11.25.2.Reverse the elements in an Array