find output
function Person(name) {
this.name = name;
this.describe = () => {
return My name is ${this.name};
};
}
const john = new Person('John');
const describeFunc = john.describe;
const result = describeFunc();
console.log(result);
function Person(name) {
this.name = name;
this.describe = () => {
return My name is ${this.name};
};
}
const john = new Person('John');
const describeFunc = john.describe;
const result = describeFunc();
console.log(result);