Javascript Array Reverse

<html>
<body>

<script>
var a = [3,5,7,8];
var ra = [];
for (var i = a.length-1; i>=0; i–)
{
var reverse = a[i];
ra.push(reverse);

}

console.log(ra)

</script>

</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *