If we don’t use ES2015 and don’t have fill(), just use .apply()
See https://stackoverflow.com/a/47041157/1851492
let Array2D = (r, c, fill) => Array.apply(null, new Array(r)).map(function() {return Array.apply(null, new Array(c)).map(function() {return fill})})_x000D_
_x000D_
console.log(JSON.stringify(Array2D(3,4,0)));_x000D_
console.log(JSON.stringify(Array2D(4,5,1)));
_x000D_