JavaScript Constructors Flashcards
What kind of inheritance does the JavaScript programming language use?
Prototype based inheritance
What is a prototype in JavaScript?
Objects that have methods athat are usable by all objects in js
How is it possible to call methods on strings, arrays, and numbers even though those methods don’t actually exist on objects, arrays, and numbers?
Prototypes: Prototypal inhetitnace.
If an object does not have it’s own property or method by a given key, where does JavaScript look for it?
__proto__
What does the new operator do?
Creates a plain JavaScript Object
What property of JavaScript functions can store shared behavior for instances created with new?
prototype
What does the instanceof operator do?
return boolean if the object on the left is an instance of the object on the right