From 5753e3c84f95ded41849019d9384cce78a05563b Mon Sep 17 00:00:00 2001 From: Kalash Agrahari Date: Wed, 2 Nov 2022 15:14:05 +0530 Subject: [PATCH] Updated 4-arrays-loops Added a note under the for loop section mentioning about skipping of different components of for loop. --- 2-js-basics/4-arrays-loops/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/2-js-basics/4-arrays-loops/README.md b/2-js-basics/4-arrays-loops/README.md index e1fa4a72..7ec89f57 100644 --- a/2-js-basics/4-arrays-loops/README.md +++ b/2-js-basics/4-arrays-loops/README.md @@ -76,6 +76,8 @@ The `for` loop requires 3 parts to iterate: - `counter` A variable that is typically initialized with a number that counts the number of iterations - `condition` Expression that uses comparison operators to cause the loop to stop when `false` - `iteration-expression` Runs at the end of each iteration, typically used to change the counter value + +✅ Note: All the above mentioned three parts are optional you can skip any of them or all of them to get different results. ```javascript // Counting up to 10