I’ll introduce the differences between JavaScript functions and methods.
I’ve compiled reference information to quickly explain the differences between functions and methods, which JavaScript beginners always ask about.
First, please read the following article:
To understand JavaScript functions, let’s read the following MDN articles:
To understand JavaScript methods, let’s read the following MDN articles:
Finally, a major point in distinguishing between functions and methods is that the “this” reference is different. The following articles are easy to understand, so if you don’t understand this well, please read them:
That’s all from the Gemba.