The while loop
There are more than one ways to execute a repeated code. While loop is one of the commonest. The syntax can be found above in the picture, the first step is instantiating a variable and giving a specific value. Most of the times this is going to be a number but as we will see later in the course this is not mandatory (many times you will find out it can be boolean etc).
Inside the while parenthesis follows a condition (that returns a boolean value always). While this condition is true, the code inside the following curly braces will be executed.
Last but not least, we need to update the value of the "Counter" variable. This is very important in order to avoid loop infinity. Avoid creating a loop whose condition ALWAYS evaluate to true, and thus runs forever.
Once the body of the loop is over, the value has been updated and then the condition is checked again in order to decide if we will execute the body of the loop once again or we will exit the loop!
Already confused let's see a practical example!