What's the difference between constructor property and instanceof method?

Tell us what’s happening:

  **Your code so far**

function Dog(name) {
this.name = name;
}

// Only change code below this line
function joinDogFraternity(candidate) {
if(candidate.constructor === Dog){
  return true;
  }
  else{
    return false;
  }
}
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36.

Challenge: Understand the Constructor Property

Link to the challenge:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.