title: How to declare private variables and private methods in es6 class
body: <p><strong>in es5 we use constructor function</strong> </p>
  
  <pre><code>function Person(name,gender){
  
      var initial ="";    // we use var key word to make variable private
  
      function getNameWithInitial(){ // this is the private method to get name with initial
          console.log(this);
          initial = this.gender ==="male"?"Mr. ":"Mrs. ";
          return initial + this.name;
      }
  
  
      this.name = name;
      this.gender = gender;
      this.getName = function(){
          return getNameWithInitial.call(this);
      }
  
  
  }
  
  
  var manas = new Person("Manas","male");
  
  console.log(manas.getName());
  </code></pre>
  
  <p><strong>My question is how to declare a private variable and private method in es6 class</strong></p>