Array

<aside> 👀 Recording 27mins

</aside>

<aside> ✏ïļ

  1. Define an array of 5 items that are all numbers
  2. Add one number at the end of the array
  3. Add another number at the beginning of the array
  4. Print out how many items you have in your array
  5. Remove the items you just added at the beginning and at the end
  6. Again print out how many items you have in your array with .length
  7. Use the for loop to print out the items in your array
  8. Use the for..of loop to print out the items in your array
  9. Use the .toString() method to print out the items of your array
  10. Use the .join() method to print out the items in your array using ; as a separator
  11. (Bonus) Check if an item exists in your array with .includes()

</aside>

<aside> ✏ïļ *What is this code going to show? `let fruits = ["Apples", "Pear", "Orange"];

// push a new value into the "copy" let shoppingCart = fruits; shoppingCart.push("Banana");

// what's in fruits? alert( fruits.length ); // ?`*

</aside>

Object

<aside> 👀 Recording 33mins

</aside>

<aside> 🧠 Can you make an array of your classmates? Imagine each classmate is an Object ðŸĪŠ (write it down either on your notebook or on the computer)

</aside>