Iterate over property in constructor

Please check my code below, its not working.


for(let property in Dog){
if(Dog.hasOwnProperty(property)){
  ownProps.push(property);
}
else{
  prototypeProps.push(property);
}
}

Link of the challenge is given below.
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties

Try typeof Dog. This must answer your question

@snigo Can you please elaborate ? I don’t get it.

Constructor is shorten from Constructor Function (any function that creates objects). for / in loop is designed to iterate through the properties of an object, not a function. You need to create an object first const myDog = new Dog('whatever goes here'); and then iterate through myDog.