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

Feedback on: irt.org FAQ Knowledge Base Q181

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

Feedback on:
irt.org FAQ Knowledge Base Q181

Sent by
Thor Larholm on February 14, 2001 at 01:34:08:

Technical:
Not technical enough

Comments:
There is no need to use eval() when dynamically constructing objects. The only action that is needed is to reference the Global object. In the browser, the Global object is the window object, in all other implementations it is the this object (when outside any function and in the Global scope). Therefor:

var a = 'nameToNewVar';
this[a] = "value";
alert(this[a])


Other feedback on 'irt.org FAQ Knowledge Base Q181' - 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.