javascript-custom-methods Flashcards

1
Q

What is a method?

A

A function stored as a property inside 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 call has ( ).

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

Describe method definition syntax (structure).

A
  1. Method name;
  2. Function keyword;
  3. Parameters (optional);
  4. Opening curly brace;
  5. Code;
  6. Closing curly brace.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe method call syntax (structure).

A
  1. Object;
  2. Method name;
  3. Arguments inside parentheses (optional).
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 a function stored inside an object as a property.

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
  1. Abstraction;
  2. Encapsulation;
  3. Inheritance;
  4. Polymorphism.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is “abstraction”?

A

Using something complex, in a simple way.

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

Converting information from one application to another.

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