On 6/23/06, Peter B. Shalimoff <[EMAIL PROTECTED]> wrote:
it's better to define substr() method once - in
Object.prototype:

Object.prototype.substr = function(){return "...";};

Now every object will have substr() method,

No, actually it's better to avoid modifying Array.prototype or
Object.prototype altogether those objects are shared with other
scripts. Exactly because of this problem - someone will try to use the
for..in loop to cycle through array's items or object's own
properties.

Nickolay
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to