1. es6's flat()
flat() will flatten the nested array and return a new array without changing the original array.
The default leveling depth is 1.
If the original array has space, the flat() method will skip the space.
var arr=[1,[2,3,[4,5,[6,7]]]];
arr.flat(); //默认深度1: arr=[1, 2, 3, [4,5, [6, 7]]]
arr.flat(2);//深度为2: arr= [1, 2, 3, 4, 5, [6, 7]]
arr.flat(Infinity);//深度无限:arr=[1, 2, 3, 4, 5, 6, 7]
(notes, to be continued)