Content deleted Content added
Waterfalls12 (talk | contribs) |
No edit summary Tag: section blanking |
||
Line 100:
; functions as object constructors: Functions double as object constructors along with their typical role. Prefixing a function call with <code>new</code> creates a new object and calls that function with its local <code>this</code> keyword bound to that object for that invocation. The constructor's <code>prototype</code> property determines the object used for the new object's internal prototype.<!-- this topic is a bit more complex than presented here --> JavaScript's built-in constructors, such as <code>Array</code>, also have prototypes that can be modified.
; functions as methods<!--not sure where to classify this under-->: Unlike many object-oriented languages, there is no distinction between a function definition and a [[method (computer science)|method]] definition. Rather, the distinction occurs during function calling; a function can be called as a method. When a function is called as a method of an object, the function's local <code>this</code> keyword is bound to that object for that invocation.
=== Vendor-specific extensions ===
|