summaryrefslogtreecommitdiffhomepage
path: root/typescript.html.markdown
diff options
context:
space:
mode:
authorashraf-patel <ashrafp725@gmail.com>2019-06-17 14:56:28 +0530
committerashraf-patel <ashrafp725@gmail.com>2019-06-17 14:56:28 +0530
commit1b67ecb30c8c634d7f1688696979798e658ca936 (patch)
tree9aac816ef7b8b117960239f238d26e5144158ff6 /typescript.html.markdown
parent145e76d3b318eab8ff78980c57f34e622a1988b2 (diff)
Add one more example
Diffstat (limited to 'typescript.html.markdown')
-rw-r--r--typescript.html.markdown5
1 files changed, 5 insertions, 0 deletions
diff --git a/typescript.html.markdown b/typescript.html.markdown
index 9f0f4c6d..827f202a 100644
--- a/typescript.html.markdown
+++ b/typescript.html.markdown
@@ -228,6 +228,11 @@ numbers = moreNumbers; // Error, mutating methods are missing
// for..of statement
// iterate over the list of values on the object being iterated
+let arrayOfAnyType = [1, "string", false];
+for (let val of arrayOfAnyType) {
+ console.log(val); // 1, "string", false
+}
+
let list = [4, 5, 6];
for (let i of list) {
console.log(i); // "4", "5", "6"