JS funciona dentro dos objetos
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();