Hello 

This is the day 21 of #30 days of javascrip coding, at this day I studied Loop – For and The Concept Of Loop Lesson i learned that
1-  The Loop is used to save time, meaning instead of writing with your hand, for example, the numbers from 0 to 9. Every time you will need to write a code and repeat it ten times in a row, each time changing the number.
2-n the case of the for-loop, you write a single line that can print from 0 to 9. We will know how this happens. The first thing we will see is the syntax of the for-loop in the following lines.
3- First, I do something called initialize, which will start the code from there. In the case of our example, the starting point will be from 0.
4-Secondly, I write a condition whose purpose is to be fulfilled. Have you reached number 9 or not yet? If you continue repeating until you reach the fulfillment of the condition and then stop, the condition will be fulfilled.
5-The third stage is in which I confirm that the increase has occurred or has already occurred, meaning that if I printed 0 for the first time and did not confirm that the 0 was printed, when the code repeats, it will not find the value that it will rely on in order to complete the printing, and therefore it will not reach the written condition.
That's what I learned today and this is the codes i have typed


Comments

Popular posts from this blog