Looping | Sololearn: Learn to code for FREE!



There are 2 kinds of loop in almost every programming language but what is the need? I haven't seen a single program which I could do with for loop but not with while loop or vice versa so what is the need to have 2? Also which one of them is faster?

8/19/2017 4:03:49 AM

Sahaj Bamba

4 Answers

New Answer




for loop is more convenient bcoz it is simpler, easier and is also the quickest loop.


for loop is just a syntactic sugar over while loop