0
A for loop is just a specialized while loop with some extra syntactic sugar to make it nicer to read. You can even use any condition you want in the for loop fields, such as omitting the variable declaration or checking other fields in the condition. It's just a nicer way to declare your counter variable, increment it, and check its value all in one line.
The below code was something I had laying around. it's a while loop that would be better as a for loop, but just wasn't because that's not the question I was answering at the time.
(code now edited to add a for loop with omitted fields)
https://code.sololearn.com/c1yx4mJ7eQ47/?ref=app