From 1b67ecb30c8c634d7f1688696979798e658ca936 Mon Sep 17 00:00:00 2001 From: ashraf-patel Date: Mon, 17 Jun 2019 14:56:28 +0530 Subject: Add one more example --- typescript.html.markdown | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'typescript.html.markdown') 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" -- cgit v1.2.3