## Loops and Iteration

- Loops and Iterations
- See three ways of iterating through an array as a JSFiddle

    let oranges = ['Naval Orange','Tangelo','Clementine','Valencia Orange'];
    /* Iterate with for..of */
    console.log("Iterate with: item of array");
    for (const myorange of oranges) {
       console.log(myorange);
    }
    console.log("DONE!");

    /* Iterate with '.forEach()' */
    console.log("Iterate with forEach()");
    oranges.forEach(function(myorange){
      console.log(myorange);
    });

    /* or with the 'arrow' form of JS functions */
    console.log("Iterate with forEach()");
    oranges.forEach(myorange => {
      console.log(myorange);
    });
    console.log("DONE!");

    /* Iterate with 'classic' for (i = 0 ; i < LENGTH ; i++) */
    console.log("Iterate with classic for i = ;  < ; i++");
    for (let i = 0; i < oranges.length; i++ ) {
       console.log(i);
       console.log(oranges[i]);
    }
    console.log("DONE!");