The For Loop

Learn about the usage of 'for' loop along with some optimization techniques regarding loops.

Introduction

You will now learn another loop that is perfect for iteration: the for loop. This loop combines several lines of code into one. The execution of the ‘for’ loop is identical to the ‘while’ loop:

Get hands-on with 1200+ tech skills courses.