New
by nickxbs
JavaScript
let pippo;
function dwarf(name) {
this.name = name;
pippo=this;
}
dwarf.prototype = {
sing: 'Heigh ho',
}
let dopeyDwarf = new dwarf('dopey');
//console.log('sing', dopeyDwarf.sing);
by nickxbs
let pippo;
function dwarf(name) {
this.name = name;
pippo=this;
}
dwarf.prototype = {
sing: 'Heigh ho',
}
let dopeyDwarf = new dwarf('dopey');
//console.log('sing', dopeyDwarf.sing);