UNPKG
tslint-config-alloy
Version:
latest (0.2.1)
0.2.1
0.2.0
0.1.0
AlloyTeam TSLint 规则
github.com/AlloyTeam/tslint-config-alloy
AlloyTeam/tslint-config-alloy
tslint-config-alloy
/
test
/
prefer-for-of
/
good.ts
11 lines
(8 loc)
•
162 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
let
foo2 = [
1
,
2
,
3
];
for
(
let
i
of
foo2) {
console
.
log
(foo2[i]); }
for
(
let
i =
0
; i < foo1.
length
; i++) {
console
.
log
(foo1[i]);
console
.
log
(i); }