js custom methods Flashcards
What is a method?
a function which is a property of an object
How can you tell the difference between a method definition and a method call?
same as a function, call has ()
Describe method definition syntax (structure).
property: function(parameters) {
code;
}
Describe method call syntax (structure).
object.method(arguments);
How is a method different from any other function?
not particularly different, just a function on an object
What is the defining characteristic of Object-Oriented Programming?
objects can contain both data (properties) and behavior (methods)
What are the four “principles” of Object-Oriented Programming?
abstraction, encapsulation, inheritance, polymorphism
What is “abstraction”?
The process of removing details or attributes in the study of objects or systems to focus attention on details of greater importance; generalization/simplification
What does API stand for?
application programming interface
What is the purpose of an API?
to give programmers a way to interact with a system in a simplified, consistent fashion