Array.prototype.concatintermediateconst a = [1, [2, 3]]
const b = [[4], 5]
a.concat(b) // β [1, [2, 3], [4], 5]concat() appends array elements at one level β nested arrays are NOT flattened.
You can pass multiple arrays to a single concat() call. This merges them all without intermediate arrays.
Challenge: Implement mergeThree(a, b, c) that returns a single array containing all elements from a, b, and c using a.concat(b, c).
mergeThree([1], [2, 3], [4]) // β [1, 2, 3, 4]
mergeThree([], ['x'], ['y']) // β ['x', 'y']