Map an array of arrays

后端 未结 6 1844
太阳男子
太阳男子 2021-02-07 02:17

Is there a method in lodash to map over an array of arrays

I would like to do something like this so that it keeps the structure of the array.

def double         


        
6条回答
  •  春和景丽
    2021-02-07 02:55

    It can be a kind of entangle:

    var Coef = Array.apply(null, Array(3)).map(function(){return
    Array.apply(null, Array(4)).map(function(){return 0})})
    

    Nevertheless, it can be useful if you want to initialize an array in Gas

提交回复
热议问题