javascript-custom-methods Flashcards
What is a method?
A function stored as a property inside an object.
How can you tell the difference between a method definition and a method call?
Method call has ( ).
Describe method definition syntax (structure).
- Method name;
- Function keyword;
- Parameters (optional);
- Opening curly brace;
- Code;
- Closing curly brace.
Describe method call syntax (structure).
- Object;
- Method name;
- Arguments inside parentheses (optional).
How is a method different from any other function?
It is a function stored inside an object as a property.
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”?
Using something complex, in a simple way.
What does API stand for?
Application Programming Interface.
What is the purpose of an API?
Converting information from one application to another.