Javascript-Constructors Flashcards
1
Q
What does the new operator do?
A
creates a new object when new is called with the constructor function
2
Q
What property of JavaScript functions can store shared behavior for instances created with new?
A
prototype property
3
Q
What does the instanceof operator do?
A
test to see if the prototype property of a constructor appears in the prototype chain of an object and returns a boolean value