Method
Also known as object method
A function associated with an object, usually accessed through one of its properties.
In the real world
const user = { greet() { return 'Hi'; } }; user.greet() calls a method.
Also known as object method
A function associated with an object, usually accessed through one of its properties.
const user = { greet() { return 'Hi'; } }; user.greet() calls a method.