Verify an Object's Constructor with instanceof

Can’t figure out why my code doesnt pass the tests while the answer in the forum which seems to be pretty much identical does? Is it some kind of glitch in the website?


function House(numBedrooms) {
  this.numBedrooms = numBedrooms;
}

// Only change code below this line

let oneRoom = new House(1);
oneRoom instanceof House;

Please post the link to the challenge you are working on. Thanks

Create a new instance of the House constructor, calling it myHouse and passing a number of bedrooms. Then, use instanceof to verify that it is an instance of House.

You must exactly match the required variable name. Otherwise the tests cannot check you code.

alright yeah should have saw that

We all overlook stuff in the instructions from time to time.

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