Return value of variable.constructor

let’s say that there is a constructor function here:

function Dog(name){ = name;

let new_variable = new Dog("puppy");


the 1st console.log will return you a function , because .constructor will return you a reference of the constructor function, following this logic if .constructor will return you a function, shouldn’t be the second statement becomes:



if the 1st one returns me a function, shouldn’t be the second one be:


Uhm…i think that Dog() would be a reference to a new instance of the function.
Using Dog you compare the reference to the function used to construct, which correspond to the constructor of new_variable ^^

Mh, nope ^^ Dog() would not be a reference to a new instance ( new Dog('..') would be ), It would just return nothing, so you would compare new_variable.constructor with a undefined value i gues^^

I think that this makes sense.