25. Constructors in Review


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);

I don't know what i am doing wrong.


Put quotes around "fluffy" and other parameters.
Rabbit1 is not the same as rabbit1.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.