Loops in Javascript are used to help in the execution of a code sequence. Typically it is used when sequence is fixed. When we want the code to run a specific sequence and number of times, the Nested loops are used to represent this function. When we don’t know the specific number of times for a sequence, the “while” loop is used to repeat the code block until it meets the specified conditions. The three parts involved in a For loop are the starter which is the keyword For, followed by the conditional testing and then to end the sequence, the EndFor keyword is use which ends the loops.
Reader Interactions
Comments
Leave a Reply
You must be logged in to post a comment.
Hey Cassidy,
This was an easy and straightforward read, It was interesting to learn about loops in this chapter and how it spits out information when you run the code.