Javascript: How can I declare non-global static methods?
<p>How can I declare non-global static methods in js?</p>

<pre><code>foo.bar = function() {
  function testing{
    console.log("statckoverlow rocks!");
  }
  function testing2{
    console.log("testing2 funtction");
  }
}
</code></pre>

<p>How can I call the testing functions? I am a newbie in JS. </p>

<p>Thanks for help.</p>
