<?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: Advanced Javascript: Objects, Arrays, and Array-Like objects</title>
	<atom:link href="http://nfriedly.com/techblog/2009/06/advanced-javascript-objects-arrays-and-array-like-objects/feed/" rel="self" type="application/rss+xml" />
	<link>http://nfriedly.com/techblog/2009/06/advanced-javascript-objects-arrays-and-array-like-objects/</link>
	<description>Expert Advice on Website Development, Javascript, Ajax, and Security</description>
	<lastBuildDate>Thu, 22 Jul 2010 16:58:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: nFriedly</title>
		<link>http://nfriedly.com/techblog/2009/06/advanced-javascript-objects-arrays-and-array-like-objects/comment-page-1/#comment-158</link>
		<dc:creator>nFriedly</dc:creator>
		<pubDate>Wed, 22 Jul 2009 19:50:42 +0000</pubDate>
		<guid isPermaLink="false">http://nfriedly.com/techblog/?p=106#comment-158</guid>
		<description>Hey Dmitriy! 

Yea, those are good points, both about arrays not getting their own type and forEach loops hitting inherited items as well as local items. It&#039;s handy when you want those inherited items to be in the loop though. 

Similarly, live collections can be really handy, as long as you realize they&#039;re live ;)</description>
		<content:encoded><![CDATA[<p>Hey Dmitriy! </p>
<p>Yea, those are good points, both about arrays not getting their own type and forEach loops hitting inherited items as well as local items. It&#8217;s handy when you want those inherited items to be in the loop though. </p>
<p>Similarly, live collections can be really handy, as long as you realize they&#8217;re live <img src='http://nfriedly.com/techblog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: illvm</title>
		<link>http://nfriedly.com/techblog/2009/06/advanced-javascript-objects-arrays-and-array-like-objects/comment-page-1/#comment-103</link>
		<dc:creator>illvm</dc:creator>
		<pubDate>Tue, 14 Jul 2009 05:01:26 +0000</pubDate>
		<guid isPermaLink="false">http://nfriedly.com/techblog/?p=106#comment-103</guid>
		<description>There is no array type in JS though. All arrays are objects! typeof [] === &#039;object&#039;; Even more confusing is HTMLCollections appear to be arrays when they are, indeed not, and inherit from a separate prototype. On top of that they are live collections and need to be cloned or otherwise cached if you are modifying them in some way (especially adding to or removing from).

What&#039;s really unfortunate is that for in loops are deceptively not forEach loops. They iterate over every key in the object on the right side of the in without regard to whether that key is actually part of that object! I don&#039;t really see an issue with the for in loops using &#039;two&#039; as an index though, it seems proper. For in returning prototype keys instead of objects keys though can be a real mess. =/</description>
		<content:encoded><![CDATA[<p>There is no array type in JS though. All arrays are objects! typeof [] === &#8216;object&#8217;; Even more confusing is HTMLCollections appear to be arrays when they are, indeed not, and inherit from a separate prototype. On top of that they are live collections and need to be cloned or otherwise cached if you are modifying them in some way (especially adding to or removing from).</p>
<p>What&#8217;s really unfortunate is that for in loops are deceptively not forEach loops. They iterate over every key in the object on the right side of the in without regard to whether that key is actually part of that object! I don&#8217;t really see an issue with the for in loops using &#8216;two&#8217; as an index though, it seems proper. For in returning prototype keys instead of objects keys though can be a real mess. =/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nFriedly</title>
		<link>http://nfriedly.com/techblog/2009/06/advanced-javascript-objects-arrays-and-array-like-objects/comment-page-1/#comment-51</link>
		<dc:creator>nFriedly</dc:creator>
		<pubDate>Thu, 18 Jun 2009 14:40:38 +0000</pubDate>
		<guid isPermaLink="false">http://nfriedly.com/techblog/?p=106#comment-51</guid>
		<description>Yes, I think an Objects and Arrays both fall under the description of collections. 

In PHP, array() can be an associative array (like an Object in javascript) or a numerical array (like an Array in javascript), there&#039;s only one object.

PHP also has Objects, which are roughly comparable to javascript objects. So really in PHP, there&#039;s two ways to do it. 

When a PHP array() is used as an associative array, the items are in a guaranteed order. In a javascript Object, the items are usually in whatever order you added them, but it is not guaranteed.</description>
		<content:encoded><![CDATA[<p>Yes, I think an Objects and Arrays both fall under the description of collections. </p>
<p>In PHP, array() can be an associative array (like an Object in javascript) or a numerical array (like an Array in javascript), there&#8217;s only one object.</p>
<p>PHP also has Objects, which are roughly comparable to javascript objects. So really in PHP, there&#8217;s two ways to do it. </p>
<p>When a PHP array() is used as an associative array, the items are in a guaranteed order. In a javascript Object, the items are usually in whatever order you added them, but it is not guaranteed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahbub</title>
		<link>http://nfriedly.com/techblog/2009/06/advanced-javascript-objects-arrays-and-array-like-objects/comment-page-1/#comment-48</link>
		<dc:creator>Mahbub</dc:creator>
		<pubDate>Thu, 18 Jun 2009 10:03:27 +0000</pubDate>
		<guid isPermaLink="false">http://nfriedly.com/techblog/?p=106#comment-48</guid>
		<description>We call Javascript object arrays as collection, isn&#039;t it? In php the similar is called an associative array.</description>
		<content:encoded><![CDATA[<p>We call Javascript object arrays as collection, isn&#8217;t it? In php the similar is called an associative array.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hardik Thakkar</title>
		<link>http://nfriedly.com/techblog/2009/06/advanced-javascript-objects-arrays-and-array-like-objects/comment-page-1/#comment-35</link>
		<dc:creator>Hardik Thakkar</dc:creator>
		<pubDate>Fri, 12 Jun 2009 07:14:45 +0000</pubDate>
		<guid isPermaLink="false">http://nfriedly.com/techblog/?p=106#comment-35</guid>
		<description>Really appreciate your article ideas and techniques to make javascripts much faster.

Today i really got to know something new about javascript technology.

Thanks for giving essential information about javascripts.</description>
		<content:encoded><![CDATA[<p>Really appreciate your article ideas and techniques to make javascripts much faster.</p>
<p>Today i really got to know something new about javascript technology.</p>
<p>Thanks for giving essential information about javascripts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SMercer</title>
		<link>http://nfriedly.com/techblog/2009/06/advanced-javascript-objects-arrays-and-array-like-objects/comment-page-1/#comment-34</link>
		<dc:creator>SMercer</dc:creator>
		<pubDate>Thu, 11 Jun 2009 15:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://nfriedly.com/techblog/?p=106#comment-34</guid>
		<description>Great article. It&#039;s easy to forget the foundations of javascript when you get so comfy with frameworks.</description>
		<content:encoded><![CDATA[<p>Great article. It&#8217;s easy to forget the foundations of javascript when you get so comfy with frameworks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
