<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Access Javascript Object Variable&#160;Properties</title> <atom:link href="http://davidwalsh.name/access-object-properties/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/access-object-properties</link> <description>PHP, CSS, MooTools, jQuery, and Everything Else</description> <lastBuildDate>Fri, 12 Mar 2010 06:18:05 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: Rudolf Leermakers</title><link>http://davidwalsh.name/access-object-properties/comment-page-1#comment-14936</link> <dc:creator>Rudolf Leermakers</dc:creator> <pubDate>Thu, 31 Dec 2009 14:59:24 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4252#comment-14936</guid> <description>@Timothy:  While it is preferable to avoid eval in code that need not be written in that form, as you show, I would like to contest that eval is far from evil.It&#039;s a basic language construct upon which the entire functional programming paradigm can be built in languages that do not support it natively. Sometimes a problem is better expressed in said paradigm, but the language prevents you from properly exploiting it&#039;s capabilities. This is one of the many ways eval *can* be used for the better of your programming speed, debug-ability and general style of programming.So please, next time you wish to share your opinion on eval, try to think of the grand picture this language construct fits in, and don&#039;t spread lies about otherwise finely crafted implementations thereof.</description> <content:encoded><![CDATA[<p>@Timothy:  While it is preferable to avoid eval in code that need not be written in that form, as you show, I would like to contest that eval is far from evil.</p><p>It&#8217;s a basic language construct upon which the entire functional programming paradigm can be built in languages that do not support it natively. Sometimes a problem is better expressed in said paradigm, but the language prevents you from properly exploiting it&#8217;s capabilities. This is one of the many ways eval *can* be used for the better of your programming speed, debug-ability and general style of programming.</p><p>So please, next time you wish to share your opinion on eval, try to think of the grand picture this language construct fits in, and don&#8217;t spread lies about otherwise finely crafted implementations thereof.</p> ]]></content:encoded> </item> <item><title>By: Limiting Variable Scope Using&#160;(function(){})(); &#124; Programming Blog</title><link>http://davidwalsh.name/access-object-properties/comment-page-1#comment-14500</link> <dc:creator>Limiting Variable Scope Using&#160;(function(){})(); &#124; Programming Blog</dc:creator> <pubDate>Mon, 14 Dec 2009 18:14:26 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4252#comment-14500</guid> <description>[...] Access Javascript Object Variable&#160;Properties [...]</description> <content:encoded><![CDATA[<p>[...] Access Javascript Object Variable&nbsp;Properties [...]</p> ]]></content:encoded> </item> <item><title>By: Access Javascript Object Variable&#160;Properties &#124; Programming Blog</title><link>http://davidwalsh.name/access-object-properties/comment-page-1#comment-14131</link> <dc:creator>Access Javascript Object Variable&#160;Properties &#124; Programming Blog</dc:creator> <pubDate>Wed, 02 Dec 2009 23:23:18 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4252#comment-14131</guid> <description>[...] Access Javascript Object Variable&#160;Properties   Related posts: [...]</description> <content:encoded><![CDATA[<p>[...] Access Javascript Object Variable&nbsp;Properties   Related posts: [...]</p> ]]></content:encoded> </item> <item><title>By: Timothy</title><link>http://davidwalsh.name/access-object-properties/comment-page-1#comment-14031</link> <dc:creator>Timothy</dc:creator> <pubDate>Mon, 30 Nov 2009 13:39:06 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4252#comment-14031</guid> <description>It&#039;s a good thing to point out that you can almost always avoid eval() by use of myObject[&#039;key&#039;] reference. for example:var myObject = {};$H({
&#039;a&#039;: 1,
&#039;b&#039;: 2,
&#039;c&#039;: 3
}).each(function(v, k) {
myObject[k] = v;
});A lot of people think you have to do something like:var myObject = {};$H({
&#039;a&#039;: 1,
&#039;b&#039;: 2,
&#039;c&#039;: 3
}).each(function(v, k) {
eval(&#039;myObject.&#039; + k + &#039; = &#039; + v);
});Avoid eval! Eval is evil.</description> <content:encoded><![CDATA[<p>It&#8217;s a good thing to point out that you can almost always avoid eval() by use of myObject['key'] reference. for example:</p><p>var myObject = {};</p><p>$H({<br
/> &#8216;a&#8217;: 1,<br
/> &#8216;b&#8217;: 2,<br
/> &#8216;c&#8217;: 3<br
/> }).each(function(v, k) {<br
/> myObject[k] = v;<br
/> });</p><p>A lot of people think you have to do something like:</p><p>var myObject = {};</p><p>$H({<br
/> &#8216;a&#8217;: 1,<br
/> &#8216;b&#8217;: 2,<br
/> &#8216;c&#8217;: 3<br
/> }).each(function(v, k) {<br
/> eval(&#8216;myObject.&#8217; + k + &#8216; = &#8216; + v);<br
/> });</p><p>Avoid eval! Eval is evil.</p> ]]></content:encoded> </item> <item><title>By: Chris the Developer</title><link>http://davidwalsh.name/access-object-properties/comment-page-1#comment-13970</link> <dc:creator>Chris the Developer</dc:creator> <pubDate>Thu, 26 Nov 2009 06:17:01 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4252#comment-13970</guid> <description>@keith - huh...never knew that. Thanks! :D</description> <content:encoded><![CDATA[<p>@keith &#8211; huh&#8230;never knew that. Thanks! :D</p> ]]></content:encoded> </item> <item><title>By: Barker Design &#124; Graphic &#38; Web Development &#187; Blog Archive &#187; Access Javascript Object Variable&#160;Properties</title><link>http://davidwalsh.name/access-object-properties/comment-page-1#comment-13967</link> <dc:creator>Barker Design &#124; Graphic &#38; Web Development &#187; Blog Archive &#187; Access Javascript Object Variable&#160;Properties</dc:creator> <pubDate>Thu, 26 Nov 2009 01:00:29 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4252#comment-13967</guid> <description>[...] Access Javascript Object Variable&#160;Properties [...]</description> <content:encoded><![CDATA[<p>[...] Access Javascript Object Variable&nbsp;Properties [...]</p> ]]></content:encoded> </item> <item><title>By: Keith</title><link>http://davidwalsh.name/access-object-properties/comment-page-1#comment-13962</link> <dc:creator>Keith</dc:creator> <pubDate>Wed, 25 Nov 2009 21:45:03 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4252#comment-13962</guid> <description>@Chris - PHP&#039;s ArrayObject class allows you to access properties using array syntax.</description> <content:encoded><![CDATA[<p>@Chris &#8211; PHP&#8217;s ArrayObject class allows you to access properties using array syntax.</p> ]]></content:encoded> </item> <item><title>By: ahsanhabib (Md. Ahsan Habib)</title><link>http://davidwalsh.name/access-object-properties/comment-page-1#comment-13973</link> <dc:creator>ahsanhabib (Md. Ahsan Habib)</dc:creator> <pubDate>Wed, 25 Nov 2009 19:12:14 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4252#comment-13973</guid> <description>Access Javascript Object Variable Properties http://tinyurl.com/y9r3oza</description> <content:encoded><![CDATA[<p>Access Javascript Object Variable Properties <a
href="http://tinyurl.com/y9r3oza" rel="nofollow">http://tinyurl.com/y9r3oza</a></p> ]]></content:encoded> </item> <item><title>By: Access Javascript Object Properties with Special Characters &#171; Internet Cafe Solution</title><link>http://davidwalsh.name/access-object-properties/comment-page-1#comment-13961</link> <dc:creator>Access Javascript Object Properties with Special Characters &#171; Internet Cafe Solution</dc:creator> <pubDate>Wed, 25 Nov 2009 17:15:46 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4252#comment-13961</guid> <description>[...] See original here:  Access Javascript Object Properties with Special Characters [...]</description> <content:encoded><![CDATA[<p>[...] See original here:  Access Javascript Object Properties with Special Characters [...]</p> ]]></content:encoded> </item> <item><title>By: dev</title><link>http://davidwalsh.name/access-object-properties/comment-page-1#comment-13960</link> <dc:creator>dev</dc:creator> <pubDate>Wed, 25 Nov 2009 16:33:17 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4252#comment-13960</guid> <description>never knew this method, very useful.</description> <content:encoded><![CDATA[<p>never knew this method, very useful.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 8/20 queries in 0.019 seconds using disk

Served from: davidwalsh.name @ 2010-03-12 07:24:51 -->