Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Feedback on: irt.org FAQ Knowledge Base Q879

irt.org | About | Feedback | 1546 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base Q879

Sent by
Scott Smith on July 27, 2000 at 13:31:58:

Length:
Just right

Comments:
Good routine for cloning objects, but I think it contains a typo. "typeof i" should be "typeof what[i]", e.g.

function cloneObject(what)
{
for (i in what)
{
if (typeof what[i] == 'object')
this[i] = new cloneObject(what[i]);
else
this[i] = what[i];
}
}



Other feedback on 'irt.org FAQ Knowledge Base Q879' - show all


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.