Skip to content

Instantly share code, notes, and snippets.

@caglarorhan
Last active February 15, 2018 20:39
Show Gist options
  • Save caglarorhan/f40c55d280d4f0e89b4011e516534054 to your computer and use it in GitHub Desktop.
Save caglarorhan/f40c55d280d4f0e89b4011e516534054 to your computer and use it in GitHub Desktop.
Reverse an Array with Array[ ] and pop
var A = [1,2,3,4,5,6,7,8,9];
var x =[A.pop(),A.pop(),A.pop(),A.pop(),A.pop(),A.pop(),A.pop(),A.pop(),A.pop()];
console.log(x);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment