Skip to content

Instantly share code, notes, and snippets.

@juliaamosova
Created September 25, 2017 03:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliaamosova/338184faa3556401cc04ea02e55bca06 to your computer and use it in GitHub Desktop.
Save juliaamosova/338184faa3556401cc04ea02e55bca06 to your computer and use it in GitHub Desktop.
Hackerrank: Print each array element in reverse order
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