I am looking at the definition for break and continue in the loops cheat sheet:
“In a loop, the
break keyword escapes the loop, regardless of the iteration number. Once
break executes, the program will continue to execute after the loop.”
My understanding, from simply looking at the command and the output, that ‘break’ is iterating through all the items in a list and stops at when an item met the condition set by the if statement. What I don’t understand( and if clarified I will know the language of explaining loops and iterations better), what does escape mean? and Why does it say “the program will continue to execute after the loop”? Shouldn’t it be the program will stop after condition is met and output all items up until that item? Maybe if a definition of what “escape, execute” mean in this context would help. I may have interpret them wrongly. What is meant by “the program will continue to execute after the loop”?
Thanks a bunch.