title: Add/return multiple properties of a global object with one function in JS
body: <p>I'm trying to use a HTML form with two fields to: create a new property within an object (like a new country e.g. 'Mexico') and append a new sub-property (continent e.g. 'North America'). The variable is this...</p>
  
  <pre><code>var countries = {
      India: {
          country: 'India',
          type: 'Asian'
      };
  </code></pre>
  
  <p>... and the HTML form inputs arg1 and arg2 into the below function:</p>
  
  <pre><code>function dropDown(arg1, arg2){
    return [countries[arg1] = {country: arg1}, countries[arg1] = {type: arg2}];
  };
  </code></pre>
  
  <p>This doesn't work. Only the last value (type) of country is appended to the var countries. Can anyone tell me why and what you would do to add multiple sub-properties to one object?</p>