$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · hard · #123

Complete the function

// returns a flattened one-level array
function flatten(arr) {
  return arr.reduce((acc, x) => acc.____(x), []);
}
// flatten([[1],[2,3]]) -> [1,2,3]

Answer: concat (also accepted: concat, concat())

concat() merges each sub-array into the accumulator and returns it.
Play Problem Solving ▸