Published
- 1 min read
js functions inside of objects
The solution for this is noted below
js functions inside of objects
Solution
var person = {
name: 'Fred',
sayName: function () {
console.log(this.name)
}
}
person.sayName()
Try other methods by searching on the site. That is if this doesn’t work