10 Days of HackeRank's challenges -Day 8

Problem statement: Array reverse

The question requires us to write a function that accepts an array as argument and returns a reverse of the array.

function reverseArray(a){

let newArray=[];

for(let i=a.length-1;i>=0;i--){

newArray.push(a[i])

}

return newArray

}

Here is a link to the questionhttps://www.hackerrank.com/challeng..

github.com/Beri28/10-days-of-code/blob/main..