Arrays
First Steps with Arrays from MDN runs through some basic array operations and manipulations.
Iterate through arrays with for..in
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!");
Each array value has an index
let oranges = ['Naval Orange','Tangelo','Clementine','Valencia Orange'];
/*
oranges[0] is "Naval Orange"
oranges[1] is "Tangelo"
oranges[2] is "Clementine"
etc.
oranges.length is 4
*/