+ 5
what does object mean in js? whats d difference between method and function?
5 Answers
+ 6
Simply put, if a function is defined inside a class it is a method. If outside then it's a function.
+ 3
Answer to the second question : https://stackoverflow.com/questions/15285293/method-vs-functions-and-other-questions
+ 3
If u ever had a chance to use java (a pure object oriented programming language) u will notice that there are no functions, but instead they have methods. simply bcoz everything in java are objects. so the thing is that a method is a function that is associated with an object.
+ 2
method is a type of function in JavaScript.the way corolla is a type of Toyota