Функции JS внутри объектов
var person = {
name: "Fred",
sayName: function() {
console.log(this.name);
}
};
person.sayName();
Glamorous Goldfinch
var person = {
name: "Fred",
sayName: function() {
console.log(this.name);
}
};
person.sayName();