Constructor and Prototypes Flashcards
1
Q
What does the new operator do?
A
makes a new blank obj, sets the prototype of that obj to the constructor function. the ‘this’ keyword is now pointed to this obj
2
Q
What property of JavaScript functions can store shared behavior for instances created with new?
A
the prototype property
3
Q
What does the instanceof operator do?
A
checks of something is a prototype of something else, returns a boolean.