一行代碼建立二維數組

安裝引用Lodash後使用其中的數組方法數組

let array = _.chunk(_.fill(Array(_.multiply(m * n)), 1), n);
複製代碼

相關閱讀


Lodash中文文檔bash

相關文章
相關標籤/搜索