📅  最后修改于: 2022-03-11 15:02:12.346000             🧑  作者: Mango
let john = {
firstName: 'John',
lastName: 'Doe',
getFullName() {
return this.firstName + ' ' + this.lastName;
}
};
console.log(john.getFullName());
Code language: JavaScript (javascript)