title: The javascript code explanation needed
body: <p>Here is a function:</p>
  
  <pre><code>function ShowHelloWorld(){
   this.x=4;
   var y=5;
   return 6;
  }
  </code></pre>
  
  <p><strong>Statement 1. <code>var res1 = ShowHelloWorld;</code></strong></p>
  
  <p>1.1 So, <code>res1</code> is a copy of ShowHelloWorld function.</p>
  
  <p>1.2 <code>res1()</code> gets 6.</p>
  
  <p>1.3 There is no way to reach values 4 and 5 from <code>res1</code>. </p>
  
  <p><strong>Statement 2. <code>var res2 = ShowHelloWorld();</code></strong></p>
  
  <p>2.1 <code>res2</code> gets 6 as a result of a function. </p>
  
  <p>2.2 There is no way to reach values 4 and 5 from <code>res2</code>.</p>
  
  <p><strong>Statement 3. <code>var res3 = new ShowHelloWorld();</code></strong></p>
  
  <p>3.1 Here <code>res3</code> is an instance of the function ShowHelloWorld(). </p>
  
  <p>3.2 <code>res3.x</code> can be reached. //res3.x==4</p>
  
  <p>3.3 There is no way to reach values 5 and 6 from <code>res3</code>.</p>
  
  <p><strong>Statement 4. <code>var res4 = new ShowHelloWorld;</code>  // with no ()</strong></p>
  
  <p>4.1 Seems like res4 is the same <code>res3</code>. Why? (I see it is the same when I test it in the browser console). </p>
  
  <p>4.2 What's the sense of this line (it makes sense if it has no errors, right?)</p>
  
  <p>Please answer my questions or correct my statements in case if they are incorrect or could be even better.</p>
  
  <p>Thank you.</p>