Computer scienceProgramming languagesJavaScriptWorking with dataArrays

Array iterating

Reverse

Report a typo

Return the array in reverse order using a for loop. Don't output it to the console.

Sample Input 1:

[ 'a', 'b', 'c', 'd' ]

Sample Output 1:

[ 'd', 'c', 'b', 'a' ]
Write a program in JavaScript
function reverse(arr) {
//write your code here
}
___

Create a free account to access the full topic