+ 4

Confused about JavaScript Methods đŸ˜” !

I'm new to JavaScript. Recently, I was studying about JavaScript methods. I guess, the functions in objects are called JavaScript methods. Am I right Guys?

7th Sep 2020, 9:43 AM
Noob Programmer
Noob Programmer - avatar
6 Answers
+ 7
Yeah, the function stored in a property of object is a method. I'm also learning this section of js. Here the SL lesson also explains this : https://www.sololearn.com/learn/JavaScript/1154/
7th Sep 2020, 10:44 AM
InfiniteLoop
InfiniteLoop - avatar
+ 4
Abhay Didn't Understand 😓
7th Sep 2020, 9:47 AM
Noob Programmer
Noob Programmer - avatar
+ 4
Abir Sheikh when we define functions in class ,we call them methods not functions ,however they do all the same thing like you would expect a normal function to do
7th Sep 2020, 9:49 AM
Abhay
Abhay - avatar
+ 4
Abir Sheikh https://youtu.be/hy-C4NY7A_8 This video is gonna help you.
7th Sep 2020, 11:10 AM
maf
maf - avatar
+ 3
Abir method / function does the same thing. it's just a term used interchangeably. But talking about declaring of the method/function inside the class we don't need to use the keyword "function" before it.
7th Sep 2020, 9:52 AM
minirkk
minirkk - avatar
+ 1
The functions in class are called methods, objects can access those class methods
7th Sep 2020, 9:46 AM
Abhay
Abhay - avatar