var john = {
name : 'Sky',
age : 23,
calculateBirthYear : () => console.log("My name is " + this.name)
}
john.calculateBirthYear();
Asked
Active
Viewed 24 times
0
![](../../users/profiles/182668.webp)
Pointy
- 371,531
- 55
- 528
- 584
-
Use a traditional `function` function instead of a `=>` function. – Pointy Jun 13 '20 at 06:03