Constructor functions
suggest changeRemarks
A constructor is an ordinary function. new supplies the special behavior: a new object whose [[Prototype]] is the function’s prototype, bound to this. Calling the function without new does not create that object. In non-strict code, this is then the global object. In strict mode it is undefined, so assigning to this throws.
Declaring a constructor function
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents