Last active
February 15, 2018 20:39
-
-
Save caglarorhan/f40c55d280d4f0e89b4011e516534054 to your computer and use it in GitHub Desktop.
Reverse an Array with Array[ ] and pop
This file contains hidden or 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
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