How to define methods in JavaScript?
<p>What is the right guidance regarding method definition in JavaScript?</p>

<ol>
<li><p>it's recommended to define methods on top of the prototype:</p>

<p>'MyObj.prototype.someMethod = function(){..}'</p></li>
<li><p>On the other hand you can't access private variables from prototype methods</p></li>
<li>Also you can't use the var _this = this; due to reason #2</li>
</ol>

<p>What do you think?</p>
