I came accross with a question #83 in https://github.com/lydiahallie/javascript-questions
function Car() {
this.make = 'Lamborghini';
return { make: 'Maserati' };
}
const myCar = new Car();
console.log(myCar.make);
To my understanding the code should log 'Lamborghini'
and conso;e.log(myCar().make)
should log 'Maserati'
But I'm totally wrong, myCar
is not a function. Why?