JS-constructors Flashcards

1
Q

What does the new operator do?

A

creates an instance of an object type, links constructors with other objects, passes the newely created object as the “this” , returns “this” if function dosen’t return an object

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

What property of JavaScript functions can store shared behavior for instances created with new?

A

prototype

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

What does the instanceof operator do?

A

tests to see if prototype property of a constructor appears anywhere in property chain

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