Constructors in review


Not sure about the calling method part.

Oops, try again. When checking rabbit2, your code caused the following error: TypeError: Cannot read property 'adjective' of undefined

function Rabbit(adjective) {
    this.adjective = adjective;
    this.describeMyself = function() {
        console.log("I am a " + this.adjective + " rabbit");

// now we can easily make all of our rabbits

var rabbit1 = new Rabbit("fluffy");

var rabbit2 = new Rabbit("happy");

var rabbit3 = new Rabbit ("sleepy");


rabbit1, rabbit2 and rabbit3 are object instances, to call a method (describeMyself) on a instance, use the following syntax:



thanks a ton! didnt realise that simple.