title: How to create multiple instances of objects in Javascript
body: <p>I have a constructor object in my code which is:</p>
  
  <pre><code>function Employee(){
      this.name = names[Math.floor(Math.random() * names.length)];
      this.age=1;
      this.level=1;
      this.production=400;
      this.totalprod=0;
  }
  </code></pre>
  
  <p>So when I create a new Employee I just say: </p>
  
  <pre><code>var employee1 = new Employee();
  </code></pre>
  
  <p>So then I can manipulate this instance of the object. Now, I want this objects to be created dynamically with the variable names: <code>employee1</code>, <code>employee2</code>, <code>employee3</code> and so on.. Is there a way to achieve this or is it impossible?</p>
  
  <p>And the other question that I have, say that I want to change the <code>age</code> of all instances at the same time, is there a way to do this? Thanks in advance and sorry if the question in silly, I'm learning!</p>
  
  <p><strong>EDIT: This is not the same as the other question as I'm using a constructor Object, not a literal Object, and, apart from that, I ask another question which is how to change a property of all instances at the same time, thanks!</strong></p>