Skip to content

2020 其他面试题常见题

快速创建 100 个 1 的数组

确实没有想到可以 Array(100) 这样使用,[empty × 100]

js
Array(100).fill(1);

Powered by veaba