算字长我有这样的循环数据:如何在for循环
for (var i = 0; i < 11;i++){
console.log(i);
}
我的问题是如何让字长,所以我希望做的结果是这样的:
0 <-- this length is 1
1 <-- this length is 1
2 <-- this length is 1
3 <-- this length is 1
4 <-- this length is 1
5 <-- this length is 1
6 <-- this length is 1
7 <-- this length is 1
8 <-- this length is 1
9 <-- this length is 1
10 <-- this length is 2
使用'i.toString()length' –