Module 1 - JS 1

    var numbers = [42, 13, 34, 18, 123]
    var turtles = ["Raphael", "Donatello", "Michaelangelo", "Leonardo"]
    var users = [
        {
            name: "Joe Schmoe",
            age: 42,
            gender: "Male"
        },
        {
            name: "Jill Schmoe",
            age: 41,
            gender: "Female",
            childrenAges: [8, 10, 12]
        },
V School7:5712 days ago
    /**
     * QUIZ:
     * 
     * 1. Why do programmers care about loops? What are they good for?
     * Allow a programmer to run the same code many times.
     * 
     * 2. In a for loop, what are the 3 main parts that go into the parentheses?
     * 
     * 
     * 3. Write a loop that logs the numbers 15 to 50 (inclusive) to the console.
     * 
     * 
     * 4. Write a loop that logs the numbers 0 to 10 (inclusive) to the 
     */
V School5:1812 days ago
    // Review - Arrays and Loops
    
    
    
    
    
    
    /* QUIZ
        1. What part of the for loop will allow you to access each indiv
            for(var i = 0;)
            numbersArr[i]
        
        2. What part of the for loop will need the array's length in ord
            for(var i = 0; i < array.length)
    // Nested Loops
    
    var arrayOfArrays = [
        [1, 2, 3],
        [4, 5, 6],
        [7, 8, 9]
    ]
    
    // matrix - grid
    
    for(var i = 0; i < arrayOfArrays.length; i++){        // how many times will this loop run = 3
        for(var j = 0; j < arrayOfArrays[j].length; j++){ // how many times will this loop run = 9
            console.log( arrayOfArrays[i][j] )
        }
V School9:4310 days ago
    #Assignment - Forception
    
    * This assignment will have you practice nested for loop logic by looping through two arrays simultaneously. 
    
    - https://coursework.vschool.io/for-within-for-within-for/
    // JS String Methods
    
    // Methods are Functions 
    // String Methods are pre-built by Javascript, so all you have to do
    // Full list can be found here: https://www.w3schools.com/jsref/jsre
    
    // var name = "luke"
    
    // toUpperCase & toLowerCase
        // var uppercasedLuke = name.toUpperCase() 
        // console.log(uppercasedLuke)
        // var lowercasedLuke = uppercasedLuke.toLowerCase()
        // console.log(lowercasedLuke)
    
V School16:0910 days ago
    #Assignment - String Methods
    
    https://coursework.vschool.io/string-methods-exercise/
    // JS Array Methods
    
    // Full list can be found here: https://www.w3schools.com/jsref/jsre
    
    
    // push - adds item(s) to the end of the array
        // arrOfFoods.push("cereal")
        // console.log(arrOfFoods)
    
    // pop - removes item from the end of the array
        // arrOfFoods.pop()
        // console.log(arrOfFoods)
    
    // unshift - adds item(s) to the beginning of the array
V School17:2710 days ago
    // Mutability and Types
    
    
    // Immutable - Cannot be changed => Passed by value
        // String
        // Numbers
        // Booleans
        var age = 10
        var otherAge = age
        otherAge = 12
        
        console.log(age)
        
    
    // Constructor Functions
    
    // They build objects 
    // "new" - instantiates the object
    
    
    function Car(make, model, year, honkSound){
        this.make = make
        this.model = model
        this.year = year
        this.honkSound = honkSound
        // this.honk = function(){
        //     console.log(this.honkSound)
        // }
    #Assignment - Employee Records
    
    * This assignment will have you create a constructor functions for employees and create a few employee objects to test it.
    
    - https://coursework.vschool.io/employee-records/
    // ES6 Part 1
    
    
    // const and let
        // global scope
        // local scope (function scoped)
        // bracket scope
    var name = "steve"
    
    // function myFunc(){
    
    //     if(2 === 2){
    //        let x = true
    //     }
    // ES6 part 2
    
    // fat arrow functions
    
    // function sum(x, y){
    //     return x + y
    // }
    
    // const sum = function(x, y){
    //     return x + y
    // }
    
    // const sum = (x, y) => x + y
    
New JS topics