GoodParts2

by Joe LeMonnier

JavaScript

var Quo = function (string) {
    this.status = string;
document.writeln( '0'+this.status )
};

// Give all instances of Quo a public method
// called get_status.

Quo.prototype.get_status = function (  ) {
document.writeln( '<br>1'+ this.status )
    return this.status;
};

// Make an instance of Quo.

var myQuo = new Quo("confused");

document.writeln('<br>2'+myQuo.get_status(  ));  // confused
document.writeln('<br>3'+myQuo.status);  // confusedq