Open catwatermelon opened 2 years ago
let o = { 1: 222, 2: 123, 5: 888 }; let arr = new Array(12).fill(null); Object.entries(o).map(([key, value]) => { arr[key] = value; })
let o = { 1: 222, 2: 123, 5: 888 }; let arr = new Array(12).fill(null); Object.entries(o).map(([key, value]) => { arr[key] = value; })