Is there any difference between a function and a method in JavaScript?? | Sololearn: Learn to code for FREE!
+ 1

Is there any difference between a function and a method in JavaScript??

13th Apr 2017, 4:57 PM
Simran Jeet Singh
Simran Jeet Singh - avatar
4 Answers
+ 5
functionally, they are the same. The only difference is that when we deal with classes or oop, we do not call that a function but a method.
13th Apr 2017, 6:25 PM
CHMD
CHMD - avatar
0
i guess both are same user can define its own method or we can say functions.. or can use built in functions..
13th Apr 2017, 5:32 PM
Vinamra Sareen
Vinamra Sareen - avatar
0
@vinamra..bro m nt talking abt java..asking abt JavaScript..
13th Apr 2017, 6:26 PM
Simran Jeet Singh
Simran Jeet Singh - avatar
0
sorry @simranjeetsingh did not put a look at javascript
13th Apr 2017, 6:35 PM
Vinamra Sareen
Vinamra Sareen - avatar