Constructor functions

suggest change

Remarks

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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents