<?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: Array-like Objects in JavaScript</title>
	<atom:link href="http://shifteleven.com/articles/2007/06/28/array-like-objects-in-javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://shifteleven.com/articles/2007/06/28/array-like-objects-in-javascript</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 05 Mar 2010 14:53:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<item>
		<title>By: mister</title>
		<link>http://shifteleven.com/articles/2007/06/28/array-like-objects-in-javascript/comment-page-1#comment-139</link>
		<dc:creator>mister</dc:creator>
		<pubDate>Thu, 11 Dec 2008 12:31:14 +0000</pubDate>
		<guid isPermaLink="false">http://dev.fecalrod.com/?p=32#comment-139</guid>
		<description>But what doesn&#039;t work is sending a resonse!
The half of my response above is missing!!</description>
		<content:encoded><![CDATA[<p>But what doesn&#8217;t work is sending a resonse!<br />
The half of my response above is missing!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mister</title>
		<link>http://shifteleven.com/articles/2007/06/28/array-like-objects-in-javascript/comment-page-1#comment-140</link>
		<dc:creator>mister</dc:creator>
		<pubDate>Thu, 11 Dec 2008 12:27:50 +0000</pubDate>
		<guid isPermaLink="false">http://dev.fecalrod.com/?p=32#comment-140</guid>
		<description>You can also find out that $A returns an Array by checking with:

var arr = $A(1,2,3);
if ( !(arr instanceof Array) )
  document.write(&quot;!!!shit!!!&quot;);

There is no !!!shit!!! it works!</description>
		<content:encoded><![CDATA[<p>You can also find out that $A returns an Array by checking with:</p>
<p>var arr = $A(1,2,3);<br />
if ( !(arr instanceof Array) )<br />
  document.write(&#8220;!!!shit!!!&#8221;);</p>
<p>There is no !!!shit!!! it works!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pops</title>
		<link>http://shifteleven.com/articles/2007/06/28/array-like-objects-in-javascript/comment-page-1#comment-138</link>
		<dc:creator>Pops</dc:creator>
		<pubDate>Thu, 06 Sep 2007 23:08:32 +0000</pubDate>
		<guid isPermaLink="false">http://dev.fecalrod.com/?p=32#comment-138</guid>
		<description>Dude!  You are a freaking LIFE SAVER!  I&#039;m a veteran C/C++ guy dealing with pointers all the freaking time, and I was trying desperating to fiqure out how to pass the poitner to the arguments[1] after my function analyzed the optional first object parameter.

I spent hours tryiing to do this,  trying to shift directly, shifting a copy,  trying to pass a c-like &amp;arguments[1]... NOPE!!

Your prototype solution hurts because I NEED TO KNOW JAVASCRIPT BETTER! &lt;G&gt;

My final solution is

function log(prefix, argv)
{
  if (typeof(prefix) != &quot;string&quot;) {
     var args = Array.prototype.slice.call(arguments); // EUREKA!
     logArgs(args,prefix);
  } else {
      logArgs(arguments,&quot;&quot;);
  }
}

Thanks a million. I had to write to tell ya YOU helped mankind! &lt;g&gt;</description>
		<content:encoded><![CDATA[<p>Dude!  You are a freaking LIFE SAVER!  I&#8217;m a veteran C/C++ guy dealing with pointers all the freaking time, and I was trying desperating to fiqure out how to pass the poitner to the arguments[1] after my function analyzed the optional first object parameter.</p>
<p>I spent hours tryiing to do this,  trying to shift directly, shifting a copy,  trying to pass a c-like &#038;arguments[1]&#8230; NOPE!!</p>
<p>Your prototype solution hurts because I NEED TO KNOW JAVASCRIPT BETTER! <g></p>
<p>My final solution is</p>
<p>function log(prefix, argv)<br />
{<br />
  if (typeof(prefix) != &#8220;string&#8221;) {<br />
     var args = Array.prototype.slice.call(arguments); // EUREKA!<br />
     logArgs(args,prefix);<br />
  } else {<br />
      logArgs(arguments,&#8221;");<br />
  }<br />
}</p>
<p>Thanks a million. I had to write to tell ya YOU helped mankind! </g><g></g></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: K. Adam Christensen</title>
		<link>http://shifteleven.com/articles/2007/06/28/array-like-objects-in-javascript/comment-page-1#comment-137</link>
		<dc:creator>K. Adam Christensen</dc:creator>
		<pubDate>Fri, 29 Jun 2007 14:27:48 +0000</pubDate>
		<guid isPermaLink="false">http://dev.fecalrod.com/?p=32#comment-137</guid>
		<description>D&#039;oh.  Yeah, @var $A = Array.prototype.slice.call@ won&#039;t work at all.  What was I thinking!?!?  Good catch!

Array isn&#039;t a primitive data type as you noticed that @typeof []@ will return @object@; however, if you do @[].constructor@, you will see that it is an Array.</description>
		<content:encoded><![CDATA[<p>D&#8217;oh.  Yeah, @var $A = Array.prototype.slice.call@ won&#8217;t work at all.  What was I thinking!?!?  Good catch!</p>
<p>Array isn&#8217;t a primitive data type as you noticed that @typeof []@ will return @object@; however, if you do @[].constructor@, you will see that it is an Array.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tore Darell</title>
		<link>http://shifteleven.com/articles/2007/06/28/array-like-objects-in-javascript/comment-page-1#comment-136</link>
		<dc:creator>Tore Darell</dc:creator>
		<pubDate>Fri, 29 Jun 2007 08:24:42 +0000</pubDate>
		<guid isPermaLink="false">http://dev.fecalrod.com/?p=32#comment-136</guid>
		<description>Nifty. I&#039;m a bit surprised that slice works like that.

That last bit doesn&#039;t work for me unless I do

&lt;pre&gt;&lt;code&gt;var $A = function(){ return Array.prototype.slice.call(arguments); }&lt;/code&gt;&lt;/pre&gt;

And even the &quot;real&quot; array returned by this won&#039;t actually be an array in the traditional sense.. Arrays in JS are basically just hash maps (objects) that use integers as keys and behave like arrays.. Thus, if you do &lt;code&gt;typeof []&lt;/code&gt; you get &#039;object&#039; back. Quirky, indeed. &lt;code&gt;arguments&lt;/code&gt; not being an array can be annoying though.</description>
		<content:encoded><![CDATA[<p>Nifty. I&#8217;m a bit surprised that slice works like that.</p>
<p>That last bit doesn&#8217;t work for me unless I do</p>
<pre><code>var $A = function(){ return Array.prototype.slice.call(arguments); }</code></pre>
<p>And even the &#8220;real&#8221; array returned by this won&#8217;t actually be an array in the traditional sense.. Arrays in JS are basically just hash maps (objects) that use integers as keys and behave like arrays.. Thus, if you do <code>typeof []</code> you get &#8216;object&#8217; back. Quirky, indeed. <code>arguments</code> not being an array can be annoying though.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
