<?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: How to use javascript hashes (or hash-table)</title>
	<atom:link href="http://www.javascriptkata.com/2007/03/29/how-to-use-javascript-hashes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javascriptkata.com/2007/03/29/how-to-use-javascript-hashes/</link>
	<description>Advanced katas for javascripters</description>
	<lastBuildDate>Fri, 30 Jul 2010 18:10:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Nehagiri</title>
		<link>http://www.javascriptkata.com/2007/03/29/how-to-use-javascript-hashes/comment-page-1/#comment-925</link>
		<dc:creator>Nehagiri</dc:creator>
		<pubDate>Fri, 25 Jun 2010 15:29:15 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=18#comment-925</guid>
		<description>very cooool! :-)</description>
		<content:encoded><![CDATA[<p>very cooool! <img src='http://www.javascriptkata.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Dascalescu</title>
		<link>http://www.javascriptkata.com/2007/03/29/how-to-use-javascript-hashes/comment-page-1/#comment-767</link>
		<dc:creator>Dan Dascalescu</dc:creator>
		<pubDate>Sat, 18 Jul 2009 13:25:51 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=18#comment-767</guid>
		<description>@nightfly: you can filter out properties inherited through the prototype chain using the &lt;a&gt;hasOwnProperty&lt;/a&gt; Object method.</description>
		<content:encoded><![CDATA[<p>@nightfly: you can filter out properties inherited through the prototype chain using the <a>hasOwnProperty</a> Object method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nightfly</title>
		<link>http://www.javascriptkata.com/2007/03/29/how-to-use-javascript-hashes/comment-page-1/#comment-755</link>
		<dc:creator>Nightfly</dc:creator>
		<pubDate>Fri, 22 May 2009 22:14:01 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=18#comment-755</guid>
		<description>Using objects as associative arrays have severe shortcomings in JS. 
It&#039;s ok and fast to use them when you just want to index into a set of data with a non-numeric key (string), but if you use libraries such as Prototype you can&#039;t iterate over the keys because those libraries add stuff to Object()&#039;s prototype, making them properties of any objects you create and thus polluting your hash tables.
You can use Prototype&#039;s (to stay with that lib) Hash object (http://prototypejs.org/api/hash) to work around this, but it&#039;s very slow compared to native objects.</description>
		<content:encoded><![CDATA[<p>Using objects as associative arrays have severe shortcomings in JS.<br />
It&#8217;s ok and fast to use them when you just want to index into a set of data with a non-numeric key (string), but if you use libraries such as Prototype you can&#8217;t iterate over the keys because those libraries add stuff to Object()&#8217;s prototype, making them properties of any objects you create and thus polluting your hash tables.<br />
You can use Prototype&#8217;s (to stay with that lib) Hash object (<a href="http://prototypejs.org/api/hash" rel="nofollow">http://prototypejs.org/api/hash</a>) to work around this, but it&#8217;s very slow compared to native objects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: web developer</title>
		<link>http://www.javascriptkata.com/2007/03/29/how-to-use-javascript-hashes/comment-page-1/#comment-711</link>
		<dc:creator>web developer</dc:creator>
		<pubDate>Mon, 16 Feb 2009 14:52:37 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=18#comment-711</guid>
		<description>this is not a best way to create hash in javascript

#var hashPetName = new Object();
#hashPetName[&quot;dog&quot;] = “Rex”;
#hashPetName[&quot;cat&quot;] = “Mistigri”;

use this instead
var hashPetName={dog:&#039;rex&#039;,cat:&#039;Mistigri&#039;};</description>
		<content:encoded><![CDATA[<p>this is not a best way to create hash in javascript</p>
<p>#var hashPetName = new Object();<br />
#hashPetName["dog"] = “Rex”;<br />
#hashPetName["cat"] = “Mistigri”;</p>
<p>use this instead<br />
var hashPetName={dog:&#8217;rex&#8217;,cat:&#8217;Mistigri&#8217;};</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.javascriptkata.com/2007/03/29/how-to-use-javascript-hashes/comment-page-1/#comment-705</link>
		<dc:creator>John</dc:creator>
		<pubDate>Mon, 26 Jan 2009 19:42:55 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=18#comment-705</guid>
		<description>Hello dude, Thanks a lot for this post. I really need this one in my project. Thank you once again......</description>
		<content:encoded><![CDATA[<p>Hello dude, Thanks a lot for this post. I really need this one in my project. Thank you once again&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://www.javascriptkata.com/2007/03/29/how-to-use-javascript-hashes/comment-page-1/#comment-704</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Fri, 16 Jan 2009 17:31:36 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=18#comment-704</guid>
		<description>Hi Dan,

thanks a lot.
It really helpt me to understand how objects work in JS.

And: “Only valid key types are number and String”.
That&#039;s also fine with me

Cheers, Thomas</description>
		<content:encoded><![CDATA[<p>Hi Dan,</p>
<p>thanks a lot.<br />
It really helpt me to understand how objects work in JS.</p>
<p>And: “Only valid key types are number and String”.<br />
That&#8217;s also fine with me</p>
<p>Cheers, Thomas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manuel</title>
		<link>http://www.javascriptkata.com/2007/03/29/how-to-use-javascript-hashes/comment-page-1/#comment-694</link>
		<dc:creator>Manuel</dc:creator>
		<pubDate>Mon, 29 Dec 2008 19:18:37 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=18#comment-694</guid>
		<description>&quot;Only valid key types are number and String&quot;.

That is very ok for me! 

Thanks Dan.</description>
		<content:encoded><![CDATA[<p>&#8220;Only valid key types are number and String&#8221;.</p>
<p>That is very ok for me! </p>
<p>Thanks Dan.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.javascriptkata.com/2007/03/29/how-to-use-javascript-hashes/comment-page-1/#comment-56</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 02 Apr 2007 17:25:50 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=18#comment-56</guid>
		<description>Thanks! I subscribed to the mailing list.</description>
		<content:encoded><![CDATA[<p>Thanks! I subscribed to the mailing list.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Greenberg</title>
		<link>http://www.javascriptkata.com/2007/03/29/how-to-use-javascript-hashes/comment-page-1/#comment-55</link>
		<dc:creator>Michael Greenberg</dc:creator>
		<pubDate>Mon, 02 Apr 2007 15:35:34 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=18#comment-55</guid>
		<description>Well, without a notion of (semi-)unique object id, there&#039;s not much to be done.  If you look at the &lt;a href=&quot;https://mail.mozilla.org/listinfo/es4-discuss&quot; rel=&quot;nofollow&quot;&gt;ES4 discussion list&lt;/a&gt;, you&#039;ll see that they&#039;ve come up with intrinsic::hashcode, which computes a non-unique object id.  You could implement a bucket hash table with that, but they don&#039;t provide one out of the box.

The mailing list is open and (from what I&#039;m told) pretty receptive.  So if you need hash tables for something, by all means mention it.</description>
		<content:encoded><![CDATA[<p>Well, without a notion of (semi-)unique object id, there&#8217;s not much to be done.  If you look at the <a href="https://mail.mozilla.org/listinfo/es4-discuss" rel="nofollow">ES4 discussion list</a>, you&#8217;ll see that they&#8217;ve come up with intrinsic::hashcode, which computes a non-unique object id.  You could implement a bucket hash table with that, but they don&#8217;t provide one out of the box.</p>
<p>The mailing list is open and (from what I&#8217;m told) pretty receptive.  So if you need hash tables for something, by all means mention it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.javascriptkata.com/2007/03/29/how-to-use-javascript-hashes/comment-page-1/#comment-54</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 02 Apr 2007 13:22:51 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=18#comment-54</guid>
		<description>Michael, how can we do hash table less terrible?</description>
		<content:encoded><![CDATA[<p>Michael, how can we do hash table less terrible?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
