JS CUSTOM METHODS Flashcards

1
Q

What is a method?

A

A specific function assigned to objects

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

Call
object.method()

definitipon
name: function(parameter) {
code block
}

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

How is a method different from any other function?

A

Methods can be called from its object

functions can not

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

What is the defining characteristic of Object-Oriented Programming?

A

objects can contain both data (as properties) and behavior (as methods).

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

What is “abstraction”?

A

Takes a complex interface and makes it simple

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

What does API stand for?

A

Application programming interface - way for 2 or more computer programs to communicate with each other

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