Skip to main content
  • To perform repeated actions , to automate tasks

Types of Loops

  • The for loop
    • statement 1 is executed one time
    • statement 2 is condition based on which loop runs
    • statement 3 is executed everytime the loop body gets executed
  • For in Loop
    • works on objects and arrays
  • For off loop
    • works on strigs and arrays , they should be iterable