3 ms·
There was only two ways I could think of to do this without the double reverse. One would introduce more complex branches (looping backwards in CoffeeScript ai
by azylman 14y ago
There was only two ways I could think of to do this without the double reverse.
One would introduce more complex branches (looping backwards in CoffeeScript ain't easy) and the other would be using Underscore.js's range function to do the same thing - that solution would be basically identical to this, except without the reverses, only I'd consider that cheating.