Skip to content

Instantly share code, notes, and snippets.

@kaizer1v
Created August 27, 2018 06:28
Show Gist options
  • Save kaizer1v/a27ebe4c3627ffe3c086304a2758a7da to your computer and use it in GitHub Desktop.
Save kaizer1v/a27ebe4c3627ffe3c086304a2758a7da to your computer and use it in GitHub Desktop.
Cycle through Array in Javascript
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