mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Merge pull request #3585 from monis0395/patch-2
[typescript/en] Fixed int array output which was shown as string
This commit is contained in:
commit
a8448c0630
@ -248,13 +248,13 @@ for (const val of arrayOfAnyType) {
|
||||
|
||||
let list = [4, 5, 6];
|
||||
for (const i of list) {
|
||||
console.log(i); // "4", "5", "6"
|
||||
console.log(i); // 4, 5, 6
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user