javascript-custom-methods Flashcards
What is a method?
A function that is a property of an object.
How can you tell the difference between a method definition and a method call?
A method definition would have the keyword function and { } for the function code block.
A method call would have the object followed by dot notation, name of method and then ( ).
Describe method definition syntax (structure).
{ property: function methodName ( [optional parameters] ) {code block }, }
Describe method call syntax (structure).
object.methodName( )
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 does API stand for?
Application Programming Interface
What is “abstraction”?
It is a process that enables a user to work with (possibly) complex things in simply ways.
What is the purpose of an API?
Selection of tools (set of code features such as methods, properties, events, and URLS) to make it easier for developers to interact with a software.
How is a method different from any other function?
a method is associated with a property while a function is not