Array.prototype.concatbeginnerconst a = [1]
const b = [2, 3]
const c = [4, 5]
a.concat(b, c) // β [1, 2, 3, 4, 5]Pass multiple arrays to concat() to join them all in a single call.
concat() can accept multiple arrays as arguments, joining them all in one call.
Challenge: Implement joinAll(arrays) that concatenates an array of number arrays into a single flat array.
joinAll([[1, 2], [3, 4], [5]]) // β [1, 2, 3, 4, 5]
joinAll([[1], [], [2]]) // β [1, 2]