javascript-custom-methods Flashcards

1
Q

What is a method?

A

A method is a function that is the value of a property in an object. It provides the behavior for the data saved in the property value pairs.

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 has the keyword function and a code block while the method call has the property name associated with the predefined function and a set of parenthesis.

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 is an object literal that contains a property that will be the methods name and the value of that property will be a function definition.

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

Describe method call syntax (structure).

A

A method call is the name of an object then a member operator (.) and the name of that method then some parenthesis.

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 only exists within an object and typically acts as the behavior of the data within that object. It has a separate scope from the global functions.

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

Abstraction and the use of objects which contains properties and methods acting as data and behaviors.

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, inheritance, encapsulation, and polymorphism

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

What is “abstraction”?

A

Abstraction is taking complex things and creating models that allow people to interact with complex things in a simplified manner.

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

To provide a consist and simplified way for two or more computer programs to interact with each other.

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