From 2b884d483c59b25739762605479d8486968fbeec Mon Sep 17 00:00:00 2001 From: HS <24558802+h-s04@users.noreply.github.com> Date: Fri, 26 Aug 2022 00:17:48 +0800 Subject: [PATCH] Add JavaScript loops and iterations resources (#1604) * Update 106-javascript-loops-iterations * Update content/roadmaps/106-javascript/content/106-javascript-loops-iterations/readme.md * Update readme.md Co-authored-by: Kamran Ahmed --- .../106-javascript-loops-iterations/readme.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/content/roadmaps/106-javascript/content/106-javascript-loops-iterations/readme.md b/content/roadmaps/106-javascript/content/106-javascript-loops-iterations/readme.md index 663cbd943..4b58e40b8 100644 --- a/content/roadmaps/106-javascript/content/106-javascript-loops-iterations/readme.md +++ b/content/roadmaps/106-javascript/content/106-javascript-loops-iterations/readme.md @@ -1 +1,15 @@ -# Javascript loops iterations \ No newline at end of file +# Loops and Iterations + +Loops offer a quick and easy way to do something repeatedly. + +You can think of a loop as a computerized version of the game where you tell someone to take X steps in one direction, then Y steps in another. For example, the idea "Go five steps to the east" could be expressed this way as a loop: + +``` +for (let step = 0; step < 5; step++) { + // Runs 5 times, with values of step 0 through 4. + console.log('Walking east one step'); +} +``` + +Free Content +Loops and iteration