0

How to initiate an empty two-dimensional array in JavaScript?

var [] arr = new Array(); var [] [] arr = ?

17th Apr 2020, 1:28 AM
Yuriy Abramov
Yuriy Abramov - avatar
1 Réponse
0
you can just do: var arr = []; later you can push value in it "arr.push(value)" or you can use ES6 spread syntax " var arr = [...value]"
17th Apr 2020, 1:46 AM
Sudarshan Rai
Sudarshan Rai - avatar