pav
5/28/2013 - 5:51 PM

instance_of_object

function Bike( color, numGears ) {
    this.color = color;
    this.numGears = numGears;
    this.numWheels = 2;
}

var myBike = new Bike("blue",6);

console.log("myBike is "+myBike.color+" and has "+myBike.numGears+" gears");