Classes and Inheritance Flashcards

1
Q

In JavaScript classes are _____

A

Functions!

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

What is the foundation of every class?

A

The constructor function

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

To create a sub-class what keyword do we need?

A

Extends

ex. class Child extends Parent {
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Methods declared inside an object are not properties of the object, but properties of the object’s _____

A

Prototype

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

What does super( ) do?

A

Super( ) tells a base’s constructor to be concerned with the sub-class’ attributes - and it allows us to get away from the confusing object.create(this, class) syntax.

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