From 6f0ddc259592c764a0ef96e0e814e1695e2f56ee Mon Sep 17 00:00:00 2001 From: gauthiier Date: Sun, 15 Jan 2023 12:22:25 +0100 Subject: [PATCH] loop --- 2.Ghost-Writing.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/2.Ghost-Writing.md b/2.Ghost-Writing.md index aabc5ed..1639981 100644 --- a/2.Ghost-Writing.md +++ b/2.Ghost-Writing.md @@ -93,11 +93,13 @@ where ```javascript let i = 0 - is the declaration and initialisation of the control variable (i) +// is the declaration and initialisation of the control variable (i) + i < X - is the continuation condition: if the condition is true, then executed the statement in the loop [do_something();], exit the loop when the consition is false +//is the continuation condition: if the condition is true, then executed the statement in the loop [do_something();], exit the loop when the consition is false + i++ - is the incremental (update) statement that is executed at the end of the loop (i.e. after the loop statement [do_something();] as been executed) +//is the incremental (update) statement that is executed at the end of the loop (i.e. after the loop statement [do_something();] as been executed) ```