JavaScript30秒, 从入门到放弃之Array(三)

Flattens an array up to the specified depth. Use recursion, decrementing depth by 1 for each level of depth. Use Array.reduce() and Array.concat() to merge elements or arrays. Base case, for depth equal to 1 stops recursion. Omit the second element, depth to fla...