- es6中的方法
flat() - push.apply()
const a = [1]
let b = [2, 4, 6]
let c = [11, 12, 13]
a.push.apply(a, b)
console.log(a) // [1, 2, 4, 6]
a.push(c)
console.log(a.flat()) // [1, 2, 4, 6, 11, 12, 13]
const a = [1]
let b = [2, 4, 6]
let c = [11, 12, 13]
a.push.apply(a, b)
console.log(a) // [1, 2, 4, 6]
a.push(c)
console.log(a.flat()) // [1, 2, 4, 6, 11, 12, 13]