can you declare a function inside an object method js code example
Example: function inside object javascript
var obj = {
func: function(a, b) {
return a * b;
}
};
obj.func(3, 6); // 18
var obj = {
func: function(a, b) {
return a * b;
}
};
obj.func(3, 6); // 18