Re:Array Iteration Interview Problem
by AustinYun on Thursday August 02, 2012 @06:20AM
(#4328080)
Here's my second Javascript draft. I intend to refactor it tomorrow so that the three if branches are unrolled into their own functions. Especially since some bizarre facet of Javascript's type coercion makes it impossible to do early returns inside the iterator function ([] << 1 somehow comes out as 1, not [1]).
https://github.com/austinyun/challenges/blob/master/array-it...