From e1be160a65d5e4d135df4fc07855c7b8d52c870f Mon Sep 17 00:00:00 2001 From: fransposito <44411858+fransposito@users.noreply.github.com> Date: Thu, 17 Jan 2019 12:02:35 -0600 Subject: [PATCH] further explanation (#27620) --- .../tutorials/iterate-with-javascript-while-loops/index.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guide/english/javascript/tutorials/iterate-with-javascript-while-loops/index.md b/guide/english/javascript/tutorials/iterate-with-javascript-while-loops/index.md index 5d0ec2943b..890e19317d 100644 --- a/guide/english/javascript/tutorials/iterate-with-javascript-while-loops/index.md +++ b/guide/english/javascript/tutorials/iterate-with-javascript-while-loops/index.md @@ -1,11 +1,13 @@ --- title: Iterate with JavaScript While Loops --- -Another type of JavaScript loop is called a `while loop` because it runs `while` something is true, and stops once that something is no longer true. +Another type of JavaScript loop is called a `while loop` because it runs `while` something is true, and stops once that something is no longer true. Unlike the `for loop`, which is made up of three parts, the `while loop` only contains a condition statement. var ourArray = []; var i = 0; while(i < 5) { ourArray.push(i); i++; - } \ No newline at end of file + } + + It is important to remember to increase the variable used in this example, without the addition of `i++` the loop would continue forver.