title: Understanding JavaScript in detail: is it a class, a function, or just a variable?
body: <p>I am a beginner in JavaScript, and I am finding one concept very confusing. Consider the code below:</p>
  
  <pre><code>var person = {
       firstName   :"Penelope",
       lastName    :"Barrymore",
       // Since the "this" keyword is used inside the showFullName method below, and the showFullName method is defined on the person object,​
       // "this" will have the value of the person object because the person object will invoke showFullName ()​
       showFullName:function () {
           console.log (this.firstName + " " + this.lastName);
       }
  ​
   }
  ​
   person.showFullName (); // Penelope Barrymore
  </code></pre>
  
  <p>Is person a class or function or just a variable?</p>
  
  <p>If assuming that person is a class, is the code <code>person.showFullName ();</code> the right way of invoking it, because in C# or anyother language we write</p>
  
  <pre><code>person perObj = new person();
  perObj.showFullName();
  </code></pre>
  
  <p>?</p>