Modifying Objects
|
|
You can define a new method for any existing class by using its prototype property. |
Number.prototype.toHexString = function () { return this.toString(16); }; var iNum = 15; alert(iNum.toHexString());
|
|
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
-
-
-
|