Function Constructor in Javascript
Anonymous
function Person(firstname, lastname) {
this.kk="hgvv";
this.firstname = firstname;
this.lastname = lastname;
return true;
}
var john = new Person('John', 'Doe');
console.log(john);
Here I am returning true ,But I am getting object with properties kk,firstName,lastName.
I am unable to understand what is going under the hood.