1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-13 18:24:39 +02: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:
Adam Bard
2019-08-03 10:19:24 -07:00
committed by GitHub

View File

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