javascript-custom-methods Flashcards

1
Q

What is a method?

A

a function that is a property of an object; a function in an object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How can you tell the difference between a method definition and a method call?

A

method definition has a function keyword with it being defined while method call just has the method name with parentheses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe method definition syntax (structure).

A

property in an object with function keyword and parameters in parenthesis with code in the code block between the curly braces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe method call syntax (structure).

A

ex: .call( )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How is a method different from any other function?

A

it is inside an object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the defining characteristic of Object-Oriented Programming?

A

it contains both data (as properties) and behavior (as methods)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the four “principles” of Object-Oriented Programming?

A

abstraction, encapsulation, inheritance, polymorphism

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does API stand for?

A

Application Programming Interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the purpose of an API?

A

acts as a middleman between user and system; delivers user response to system, and system response back to user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is “abstraction”?

A

generalizing/simplifying what is going on

How well did you know this?
1
Not at all
2
3
4
5
Perfectly