title: When does a function get terminated with };
body: <p>Ok, I asked a question, and someone smarter than me said the question was an "exact" duplicate of mine.  Well it wasn't, and the answers did not answer the guy's question.  He wanted to know how to call another procedure, I want to know how to call a function within the class.  That being said when I was trying to find an answer to my problem and I was looking at answers to similar questions sometimes function were terminated with }; other times with } and still other times with }, (this one I think I understand).  However I cannot see in rhyme or reason why or when the brace with a semicolon is to be used and when just the brace should be used:</p>
  
  <p>Here was the first answer</p>
  
  <pre><code>var ExampleClass = function(){
      this._m_a = null;
  };
  ExampleClass.prototype.get_m_a = function(){
      return this._m_a;
  };
  ExampleClass.prototype.set_m_a = function(value){
     this._m_a = value;
  }; 
  </code></pre>
  
  <p>notice this answer doesn't even address the calling of another routine!  However the functions are terminated with a };  (Why?)</p>
  
  <p>Here is another answer:</p>
  
  <pre><code>var M_A = function()
  {
      var m_a; //private variable
  
      this.get = function()
      {
           return m_a;
      }
  
      this.set = function(value)
      {
           m_a = value;
           RunFunction();    //run some global or private function
           this.runPublic(); // run a public function
      }
  }
  </code></pre>
  
  <p>This guy kinda answers the question but all of the functions are terminated with a } with no semicolon following (Why?)</p>
  
  <p>Finally the answer is unsatisfactory, What is a global or private function? and what is a public function?  Why does the public function refer to "this".  Anyhow I am probably the village idiot but I still do not know how to call a function I have defined in the class from within the class, and I don't know whether the termination of functions inside a class should be with a }; or just a }.  So I have now spent almost 12 hours trying to get one little class to work in javascript to no avail.  </p>