title: Working on Javscript OOP project for MERN: Class and Constuctors
body: <p>I am learning about classes and constructors for MERN, and I am stuck on an algorithm.</p>
  <p>Basically, this is what I have to do:
  create a Ninja class
  add attribute: name
  add attribute: health
  add attribute speed;  give a default of 3;
  add attribute strength;. default of 3
  add method sayName(); should log ninja's name
  add method showStats(); should console log all stats (name, strength, speed and health)
  add method drinkSake();  should increase health by +10</p>
  <p>This is my code so far:</p>
  <pre class="lang-js prettyprint-override"><code>class Ninja {
      constructor(name,health){
          this.speed = 3;
          this.strength = 3;
      }
      sayName() {
          this.name = &quot;Lemon&quot;;
      }
      showStats(){
          this.name = name;
          this.health = health;
          this.speed = speed;
          this.strength = strength;
          console.log(showStats);
      }
      drinkSake(){
          this.health += 10;
      }
      
  }
  </code></pre>
  <p>and then my constructor is listed at the bottom outside of the functions (I tried to play it inside and I also received an error</p>
  <pre class="lang-js prettyprint-override"><code>const ninja = new Ninja (&quot;lemon&quot;, 100){
      Ninja.sayName();
      console.log(ninja.name);
  }
  </code></pre>
  <p>I am having a problem figuring out where the new instances goes. If you could keep the advice as basic as possible I would much appreciate it.</p>