class Person {
name: string;
age: number;
constructor(name: string, age: number) {
this.name = name;
this.age = age;
}
getAge() {
return this.age;
}
getName = () => {
return this.name;
}
}
getAge is normal function. getName is lambda function. Is there a difference between these in this context?