 <p>It's because you are using <code>Dictionary.prototype</code> on your methods. Replace them with <code>this</code> and it will work:</p> <pre><code>this.put = function() this.firstKey = function() this.lastKey = function() ... </code></pre> <p>Using the <code>this</code> keyword, you are assigning methods to your <code>Dictionary</code> [sort of] class. You are simply making the functions public. If you look at your functions such as <code>removeItemArray()</code> then these are private and only accessible from within the object.</p> <p>Prototype works differently. This is a nice quote from an answer to <a href="http://stackoverflow.com/questions/572897/how-does-javascript-prototype-work">this question</a> about prototype:</p> <blockquote> <p>The protoype is the base that will be used to construct all new instances and also, will modify dinamically all already constructed objects because in Javascript objects retain a pointer to the prototype</p> </blockquote> <p>The purpose of prototype is to give the ability to add methods to an object at runtime. This may seem somewhat of an alien concept if you're coming from classical OOP languages, where you traditionally pre-define a class and its methods.</p> <p>Have a look at the other answers in that question which explain prototype really well.</p>