Array.reverse()
|
|
The reverse() method reverses the order of the elements in the array according to the array index numbers. |
<html> <script language="JavaScript"> <!-- lineOfPeople = new Array("A","B","C"); lineOfPeople.reverse(); document.write("lineOfPeople[0]=",lineOfPeople[0],"<br>"); document.write("lineOfPeople[1]=",lineOfPeople[1],"<br>"); document.write("lineOfPeople[2]=",lineOfPeople[2],"<br>"); --> </script> </html>
|
|
|
HTML code for linking to this page:
Related in same category :
-
|
|