Holla Mate actually for and while loop are very much similar in action. But the main thing is in for loop all variable initialisation ,condition and increment occurs at the same time so we can use it during patterns,etc,while, in while loop it occurs in different time.
Hope it helps