title: Make a script to create MongoDB collections from Mongo shell?
body: <p>Could you please help me out in writing Mongo Shell script to create new collections and indexes to it. Here are some part of the code which i wrote and i need to refactored it.</p>
  
  <pre><code>db.createCollection("Dog", { autoIndexId : true});
  
  db.createCollection("Cat", { autoIndexId : true});
  
  db.createCollection("Mouse", { autoIndexId : true});
  
  db.createCollection("Name", { autoIndexId : true});
  </code></pre>
  
  <p>In above code can i write single statement to create multiple collections? and also add multiple indexes to one collection in one go? </p>