HOME FUNCTIONS OBJECTS [ARRAYS]

FUNCTION

A FUNCTION is a declaration or a statement. They start with the name of the function, followed by a list of paramters inside of parentheses. All functions in JS will have curly brackets in them.

function myFunc(theObject) {
    theObject.make = 'Honda';
}

OBJECT

an OBJECT is its own entity, with features and type. Compare it to a box, a box is an object, with properties. A box can have a color, a shape, size, etc. The same way, JavaScript objects can have all of those things as well.

var myCar = new Object();
        myCar.make = 'Honda';
        myCar.model = 'Civic';
        myCar.year = 2012;

[Arrays]

An ARRAY is a variable that can store multiple different values. They are indicated with a square bracket followed by the values seperated with commas.

var myArray = ["colts", "pacers"]