title: Javascript Mutable Parameter?
body: <p>This is just a technical question about javascript.  In javascript, one member of my group found something odd with javascript object creation.  For some reason, the parameters in the object are already treated as members without assigning them to any member variables created in the constructor of the object.  The parameters are mutable also as seen in the code block below.</p>
  
  <p>Here's the code to show the testing we have being doing.</p>
  
  <pre><code>function NamedItem(name)
  {
      name = 5;
  
      this.getName = function ()
      {
          return name;
      }
  }
  
  
  document.write(namedItem.getName() + "\n");  //5
  </code></pre>
  
  <p>Is this legitimate? Is it dangerous?</p>