Fe-interview: [js] 第473天 使用js写一个方法生成0000-9999一万个数字(4位数)

Created on 31 Jul 2020  ·  1Comment  ·  Source: haizlin/fe-interview

第473天 使用js写一个方法生成0000-9999一万个数字(4位数)

3+1官网

我也要出题

js

Most helpful comment

Array.from({ length: 10000 }, (_, i) => `${i}`.padStart(4, 0));

>All comments

Array.from({ length: 10000 }, (_, i) => `${i}`.padStart(4, 0));
Was this page helpful?
0 / 5 - 0 ratings