How to add a method to a javascript object?
<p>I have my js constructor:</p>

<pre><code>Function myobj(){
    This.type = "triangle";
}
</code></pre>

<p>How do I add a method to it like:</p>

<pre><code>Triangle.mymethod();
</code></pre>
