Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
for the first else if where (!puzzle[x][y]) you return rec((x+1)%9,y+(x==9?1:0)) but x will never equal 9 because of %9 so this can be replaced with return rec((x+1)%9,y+1) since you have the catch at the top for where y == 9. Very nice solution though.
When thinking of an array, I think of x as the column and y as the row.
For example, the array [[1,2,3],[4,5,6],[7,8,9]] would be displayed as
[1,2,3]
[4,5,6]
[7,8,9]
not as
[1,4,7]
[2,5,8]
[3,6,9]
So I would think of a Miner sitting on 2 in my array as having coordinates of {x:1, y:0} not {x:0, y:1}. The Miner and exit coordinates are set with x and y coordinates using my later example, it gets confusing....
One issue I see with this is if the word is one character like "I" which would return "IIay".
Putting in if(el.length > 1) el = el.slice(1) + el.slice(0, 1); return el + "ay" in the map function would fix that.