1、看输出 setTimeout(() => { console.log(2) Promise.resolve().then(() => { console.log(3) }) }) new Promise((resolve) => { console.log(4) setTimeout(() => { console.log(5) resolve(); }, 2); }).then(res => { console.log(res) });2、数组扁平化,能控制扁平化层级array.flat(arr, ...