JavaScript tutorial - 0 views
-
for your own objects, you may wish to provide a special string that may provide more useful information. To do this, simply define the 'toString' method:
-
not have to store individual copies of the methods for each instance of the object, so it may require less memory, but it will require the browser to search the current and parent scopes to find the methods. This may cause a marginal delay
-
Saying 'this.propertyname' as I did above will create a public property. Any script can create an object then use and modify its properties directly. Using 'var' to define a variable in the constructor will create a private property.
- ...7 more annotations...