JavaScript-Custom-Methods Flashcards
What is a method?
A method is a function that is a property of an object
How can you tell the difference between a method definition and a method call?
The difference is that a method call will use a open and closed parentheses at the end of the method name i.e. doFunction()
Describe method definition syntax (structure).
The method definition syntax consist of assigning a function to property key name
Describe method call syntax (structure).
method call syntax includes using dot notation with the object name on the left and the key name of the method to the right. Also a pair of parentheses after the key name to call the method.
How is a method different from any other function?
A method is different from other functions because they are a property of an object
What is the defining characteristic of Object-Oriented Programming?
objects can contain both data (as properties) and behavior (as methods).
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?
is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software.[