Created
September 25, 2017 03:06
-
-
Save juliaamosova/338184faa3556401cc04ea02e55bca06 to your computer and use it in GitHub Desktop.
Hackerrank: Print each array element in reverse order
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() { | |
var n = parseInt(readLine()); | |
arr = readLine().split(' '); | |
arr = arr.map(Number); | |
console.log(arr.reverse().join(' ')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment