summaryrefslogtreecommitdiffhomepage
path: root/typescript.html.markdown
diff options
context:
space:
mode:
authorashraf-patel <ashrafp725@gmail.com>2019-06-18 12:21:00 +0530
committerashraf-patel <ashrafp725@gmail.com>2019-06-18 12:21:00 +0530
commitff3dd723599190ccb1b5454f297d116b5c446c70 (patch)
tree8abf51401e0aa9ed1f71819d001676796622ebdd /typescript.html.markdown
parent1b67ecb30c8c634d7f1688696979798e658ca936 (diff)
PR changes: use const instead of let
Diffstat (limited to 'typescript.html.markdown')
-rw-r--r--typescript.html.markdown6
1 files changed, 3 insertions, 3 deletions
diff --git a/typescript.html.markdown b/typescript.html.markdown
index 827f202a..55d8cefe 100644
--- a/typescript.html.markdown
+++ b/typescript.html.markdown
@@ -229,18 +229,18 @@ 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) {
+for (const val of arrayOfAnyType) {
console.log(val); // 1, "string", false
}
let list = [4, 5, 6];
-for (let i of list) {
+for (const i of list) {
console.log(i); // "4", "5", "6"
}
// for..in statement
// iterate over the list of keys on the object being iterated
-for (let i in list) {
+for (const i in list) {
console.log(i); // "0", "1", "2",
}