title: a class in javascript
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/55611/javascript-private-methods">JavaScript private methods</a>  </p>
  </blockquote>
  
  
  
  <p>I was kind of busy playing with jquery, Ext JS, ...etc. that I never required to do this. So, I doubt if I am right.</p>
  
  <p>The question is:</p>
  
  <p>Create a Person class with public/private/privileged members and methods.</p>
  
  <p>My solution is:</p>
  
  <pre><code>function Person () {
      var privatemember; //I wonder if there is any other way
      this.publicmember = null;
      this.privilegedmember = function (){
          //anything here
      }
  }
  Person.prototype.sayHi = function(){
      "Hi";
  }
  </code></pre>
  
  <p>Please correct me if I am wrong, also explain individual in detail</p>
  
  <p>Thanks.</p>