Function is a code that has to play a role (a function) of doing something. Method is a method to resolve the problem. It does the same thing. It is the same thing. If you want to be super precise and go along with the convention you can call methods as the functions inside objects. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.