//sample solution
// create your class here
function Candy(name){
this.name = name;
};
// this code should print "chocolate" then "gummy bears"
var chocolate = new Candy("chocolate");
console.log( chocolate.name );
var gummyBears = new Candy("gummy bears");
console.log( gummyBears.name );
No comments:
Post a Comment