How to access variables from class using static methods?
<pre><code>//my class
function myClass()
{
   this.pubVar = 'hello public';
   var priVar = 'hello private';


}

myClass.staticMethod = function()
{

   //how do i access thos variables here

}
</code></pre>

<p>I tried <code>alert(this.pubVar)</code> and <code>alert(priVar)</code> with no success. What am I doing wrong?</p>

<p>I'm going to change the question a bit.. I didn't explain it well the first time through. </p>

<p>How do I declare static variables in a class?</p>

<p>I know with java it's simple, you just put static infront of the variable type and presto you've got a static variable. I can't seem to find that option for javascript..</p>
