How to Reverse an Array

Bynayakdillip

How to Reverse an Array

The reverse() method reverses the elements in an array.
Syntax:arrayName.reverse()

Example:-

[html]
var programming = ["c#", "c","java","apex"];
var programmingReverseOrder = programming.reverse();
alert(programmingReverseOrder);
[/html]
it will be print like
apex,java,c,c#

About the author

nayakdillip administrator

Leave a Reply