javascript-constructors Flashcards
1
Q
What does the new operator do?
A
creates an instance of object from the constructor function(user-defined or built-in object).
2
Q
What property of JavaScript functions can store shared behavior for instances created with new?
A
constructor
3
Q
What does the instanceof operator do?
A
tests to see if the prototype property of a constructor appears anywhere in the prototype chain of an object. The return value is a boolean value.