title: Why are my variables different depending on whether they're an array or an integer?
body: <p>Reading around the internet about Javascript arrays and their methods I found something and I don't understand what is happening.  I was specifically reading about the Array.reverse() method:</p>
  
  <pre><code>var numbers = [60, 50, 20, 30];
  var value = numbers.reverse();
  
  console.log(numbers); // [30, 20, 50, 60]
  console.log(value); // [30, 20, 50, 60]
  </code></pre>
  
  <p>What confused me about this was why was the value of the variable "numbers" changed here?</p>
  
  <p>I'm confused because the same would not hold true here:</p>
  
  <pre><code>var number = 3;
  var value = number * 2;
  
  console.log(number); // 3
  console.log(value); // 6
  </code></pre>
  
  <p>I realize in the first example I'm dealing with arrays, and in the second just integers.  I don't understand why the value of the variable "number" IS modified when you perform a function on the variable "value".  However it isn't modified in the second example.  What is the difference here?</p>