Created
August 27, 2018 06:28
-
-
Save kaizer1v/a27ebe4c3627ffe3c086304a2758a7da to your computer and use it in GitHub Desktop.
Cycle through Array in Javascript
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
let arr = [1, 2, 3]; | |
// cycle the `arr` by | |
arr.unshift(arr.pop()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment