Programmers use a method called FOR NEXT loops to iterate/count/move through a list of items for which the total number of items is known.
We may know that we have 10 files in a folder.
We want to display the filenames list in a web page.
We would tell the web page to go to the folder and display the files as it finds them and stop when it gets to 10. Whoala! Our list of files is displayed.
The logic is as follows..
Files = 0 (We haven't started listing them yet)
For Files = File + 1 (We're about to display a file)
Display Firs File
If Files = 10
End (We need to get out of the loop)
Else Next File (Go back to the "For" and start again, which will add another "1" to the count)
Else End (Stop! We're done. It must have equaled 10 which is our file quantity)
Lets change one small thing... :-)
For Information = Information + 1
If lies confirm bias
Can you see the problem? Where's the truth? The only thing that's gonna stop this loop is the truth!
Got yaself stuck in a loop?
How we get out of this loop
For information = information +1
If information = Lies
End (Get out of this loop)