Using an object as a prototype
<p>Can anyone tell me why this code does not work?</p>

<pre><code>PhoneNumber.prototype = Map;

var Map = {
    writeToDOM : function(container) {
        //DO STUFF HERE
    }   
};

PhoneNumber.writeToDOM(Container);
</code></pre>

<p>Is it not possible to reference an object in respect to an object's protype and use said object's functions? The reason I would want to do this is so I can use the Map variable on multiple objects rather than having to repeat the writeToDOM code for each object like this:</p>

<pre><code>Object1.prototype.writeToDOM = function() {
    //DO STUFF HERE
}

Object2.prototype.writeToDOM = function() {
    //DO the exact same stuff as Object1
}
</code></pre>
