JavaScript edit

Constructor functions

Remarks

Constructor functions are actually just regular functions, there’s nothing special about them. It’s only the new keyword which causes the special behavior shown in the examples above. Constructor functions can still be called like a regular function if desired, in which case you would need to bind the this value explicitly.

Feedback about page:

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

Constructor functions/
Declaring a constructor function

Table Of Contents
17 Map
18 Set
28 Date
31 AJAX
42 JSON
57 Constructor functions
104 Tilde
107 Events
  ↑ ↓ to navigate     ↵ to select     Esc to close