mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-01-13 12:45:58 +00:00
[typerscript/en] Iterating over an array iterates over all enumerable *string* properties (#5227)
This commit is contained in:
parent
a78b6bde87
commit
bbb72aea29
@ -271,7 +271,7 @@ for (const i of list) {
|
||||
// for..in statement
|
||||
// iterate over the list of keys on the object being iterated
|
||||
for (const i in list) {
|
||||
console.log(i); // 0, 1, 2
|
||||
console.log(i); // "0", "1", "2"
|
||||
}
|
||||
|
||||
// Type Assertion
|
||||
|
Loading…
Reference in New Issue
Block a user