Answers for "printing array in reverse order in java"

3

how to print array backwards

var array = ['a','b','c','d','e','f','g']
var j = array.length 

for(var i = 0; i < array.length ; i++){
    console.log(array[j])
    j=j-1 }

    /*

var j holds value of the array's number of values so every time in the loop it decrements by 1 making the 
function print a backwars array



    */
Posted by: Guest on June-05-2020

Code answers related to "printing array in reverse order in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language