Basically create function that takes two arguments (string and size) and then chunk the string into arrays the length of the size given. Then look at each array and based on a math mathematical formula (is sum of the cubes of its digits is divisible by 2**)**, either rotate or reverse the array and join it all back and return that string as the value.

Challenge here was to write a function that, given a random string of directions (n, s, e, w) will calculate if the given string would return you to your current location in exactly 10 mins. Each direction given equals 1 city block which takes 1 min to cover.

Read More