Javascript – I am just trying to run a function inside an object but it returns undefined output
const rajat = { FirstName: "Rajat", middleName: "Kumar", lastName: "sahoo", birthYear: 1998, location: "Bhubaneswar", job: "Programmer", friends: ["Michel", "Jack", "James", "Juile"], calcAge: function () { this.Age = 2023 - this.birthYear; // `here if i creat the age object it give…