Ad
  • Default User Avatar

    For loops need all three statements together like this : for (var i = 0; i < array.length; i += length).
    There is also a better way for flattening nested arrays.