JavaScript-custom-methods Flashcards

1
Q

What is a method?

A

A function that is property of 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

A method definition is the instruction and a call is when you access those instructions. Method definition starts with a function keyword. A method call has the arguments list

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

Describe method definition syntax (structure)

A

PropertyName: function()

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

Describe method call syntax (structure)

A

objectName.methodName()

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’s a property within an object. Associated with objects

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

What is the defining characteristics of Object-Oriented Programming?

A

The fact that objects can contain both data (as properties) and behavior (as methods). It’s encapsulation. Grouping similar things in one place. Keeping everything organized into their own objects that you do very specific things.

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 is “abstraction”?

A

Being able to work with (possibly) complex things in simple ways.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
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
10
Q

What is the purpose of an API?

A

Give programmers a way to interact with a system in a simplified, consistent fashion: aka, an abstraction

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