Day 69
Building constructors...
#CodingPhase #TheCodingWay #365CodingPhaseChallenge
**********
function Fruit(name, color, shape) {
this.name = name;
this.color = color;
this.shape = shape;
this.describe = function() {
return 'A ' + this.name + ' is the color ' + this.color + ' and is the shape ' + this.shape;
}
}
#CodingPhase #TheCodingWay #365CodingPhaseChallenge
**********
function Fruit(name, color, shape) {
this.name = name;
this.color = color;
this.shape = shape;
this.describe = function() {
return 'A ' + this.name + ' is the color ' + this.color + ' and is the shape ' + this.shape;
}
}
Comments
Post a Comment