傳統的寫法應該就是對比 index 和 lengthmyArray.forEach((value, index, array) => { index === array.length - 1 && ( // 回調 )})有沒有什么比較優雅的方法呢? 總覺得這樣寫有點 low
有什么優雅的 forEach 的完成回調的寫法
桃花長相依
2018-12-12 18:15:53