Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is the solution to Codewars' Kata: My head is at the wrong end.
function fixTheMeerkat(arr) {
var end = arr.shift();
var begin = arr.pop();
arr.push(end);
arr.unshift(begin);
return arr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.