Return the array in reverse order using a for loop. Don't output it to the console.
Array iterating
Reverse
Report a typo
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
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.