title: Unable to find how "undefined" is getting printed in Example
body: <p>I have got a simple example where I am using Constructor function to create object and print -- </p>
  
  <ol>
  <li>Object</li>
  <li>Name property via function.</li>
  </ol>
  
  <p>However, along with the 2 items I am getting <code>undefined</code> also printed. I don't know how this is getting printed in outcome. Please, someone help in understanding how the hell is this <code>undefined</code> also getting printed as outcome! </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
      &lt;head&gt;&lt;/head&gt;
      &lt;body&gt; 
          &lt;script&gt;
              var alpha = function(name, age) {
                  this.name = name;
                  this.age = age; 
                  this.printName = function() {
                      console.log(this.name);
                  }
              };
  
              var obj1 = new alpha("Jane", 23);
   
              console.log(obj1);
              console.log(obj1.printName());
  
          &lt;/script&gt; 
      &lt;/body&gt; 
  &lt;/html&gt; </code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://i.stack.imgur.com/rSe36.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rSe36.png" alt="enter image description here"></a></p>