1Function — a set of instructions that perform a task. We can define a
2function using the function keyword, followed by Name and optional parameters.
3Body of function is enclosed in Curly braces.
4
5
6Method — a set of instructions that are associated with an object.
7A JavaScript method is a property of an object that contains a function
8definition. Methods are functions stored as object properties.
9Object method can be accessed with the following syntax:
10object = {
11 methodName: function() {
12 // Content
13 }
14};
15
16object.methodName()
17