Why the global variable remain the same after calling a function to increase it?
<p>Why the global variable is still 5 after calling the increment function? Thanks in advance for any help.</p>

<pre><code>&lt;script&gt;
function increment(val) {
  val+=1;
}

var val = 5;

increment(val); 

alert(val);

&lt;/script&gt;
</code></pre>
