function Dog(name) {
this.name = name;
}
// Only change code below this line
function joinDogFraternity(candidate) {
if(candidate.constructor === Dog){
return true;
}else{
return false;
}
}
//test
let beagle = new Dog();
console.log(joinDogFraternity(beagle))
//result
//true
No comments:
Post a Comment