JavaScript-custom-methods Flashcards
What is a method?
A function that is property of an object
How can you tell the difference between a method definition and a method call?
A method definition is the instruction and a call is when you access those instructions. Method definition starts with a function keyword. A method call has the arguments list
Describe method definition syntax (structure)
PropertyName: function()
Describe method call syntax (structure)
objectName.methodName()
How is a method different from any other function?
It’s a property within an object. Associated with objects
What is the defining characteristics of Object-Oriented Programming?
The fact that objects can contain both data (as properties) and behavior (as methods). It’s encapsulation. Grouping similar things in one place. Keeping everything organized into their own objects that you do very specific things.
What are the four “principles” of Object-Oriented Programming?
abstraction, encapsulation, inheritance, polymorphism
What is “abstraction”?
Being able to work with (possibly) complex things in simple ways.
What does API stand for?
Application Programming Interface
What is the purpose of an API?
Give programmers a way to interact with a system in a simplified, consistent fashion: aka, an abstraction