javascript-custom-methods Flashcards
What is a method?
JavaScript methods are actions that can be performed on objects. A JavaScript method is a property containing a function definition.
How can you tell the difference between a method definition and a method call?
A function can pass the data that is operated and may return the data.
The method operates the data contained in a Class.
Describe method definition syntax (structure).
const obj = { foo() { return 'bar'; } };
Describe method call syntax (structure).
object.function()
How is a method different from any other function?
A function is directly called by its name, whereas a method includes a code that is called by the object’s name.
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”?
The process of removing physical, spatial, or temporal details[2] or attributes in the study of objects or systems to focus attention on details of greater importance;[3] it is similar in nature to the process of generalization;
What does API stand for?
Application programming interface
What is the purpose of an API?
An API (Application Programming Interface) is a set of functions that allows applications to access data and interact with external software components, operating systems, or microservices. To simplify, an API delivers a user response to a system and sends the system’s response back to a user.