/**
 * Given an array of integers, create an array of two-item arrays using Helper Method Recursion
 *
 * Input:   Array of Integers
 * Output:  Array of two-item Arrays
 *
 * Example: arrayPairs([1, 2, 3, 4, 5, 6])  =>    [[1,2], [3,4], [5,6]]
 * Example: arrayPairs([1, 2, 3, 4, 5])     =>    [[1,2], [3,4], [5, undefined]]
 **/

function arrayPairs(arr){

}

@@ -355,7 +355,428 @@
 r)%7B%0A
-%0A%7D
+  var result = %5B%5D;%0A%0A  function helper(i, buildUp, res)%7B%0A    if( i %3E arr.length )%7B%0A      return;%0A    %7D else %7B%0A      if( i %25 2 === 0 )%7B%0A        buildUp.push(arr%5Bi%5D);%0A        helper(i+1, buildUp, res);%0A      %7D else %7B%0A        buildUp.push(arr%5Bi%5D)%0A        res.push(buildUp);%0A        helper(i+1, %5B%5D, res)%0A      %7D%0A    %7D%0A  %7D%0A  helper( 0, %5B%5D, result );%0A  return result;%0A%7D%0A%0Avar ex = %5B1, 2, 3, 4, 5, 6, 7%5D;%0Aconsole.log(arrayPairs(ex))
 %0A

add solution