JavaScript-Custom-Methods Flashcards

1
Q

What is a method?

A

A method is a function that is a 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

The difference is that a method call will use a open and closed parentheses at the end of the method name i.e. doFunction()

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

Describe method definition syntax (structure).

A

The method definition syntax consist of assigning a function to property key name

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

Describe method call syntax (structure).

A

method call syntax includes using dot notation with the object name on the left and the key name of the method to the right. Also a pair of parentheses after the key name to call the method.

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

A method is different from other functions because they are a property of 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

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
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

is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software.[

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