JS CUSTOM METHODS Flashcards
What is a method?
A specific function assigned to objects
How can you tell the difference between a method definition and a method call?
Call
object.method()
definitipon
name: function(parameter) {
code block
}
How is a method different from any other function?
Methods can be called from its object
functions can not
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”?
Takes a complex interface and makes it simple
What does API stand for?
Application programming interface - way for 2 or more computer programs to communicate with each other