[typerscript/en] Iterating over an array iterates over all enumerable *string* properties (#5227)
Some checks failed
Trigger site build / deploy (push) Has been cancelled
CI / lint (push) Has been cancelled

This commit is contained in:
Micha 2025-01-10 21:34:00 +01:00 committed by GitHub
parent a78b6bde87
commit bbb72aea29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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