标签: javascript arrays
我正在寻找
[0] * n用于创建长度为n的数组(python中的列表)。如何使用Javascript来做到这一点?
答案 0 :(得分:0)
//12 is an axample, the length of the array let arr = new Array(12).fill(0); console.log(arr)