title: how to push values from listObjects to an array
body: <p>I have an array for example  named yourArray.  <code>var yourArray = [];</code>  When I get object names with listObjects from s3, I want to push this object names to the array.</p>
  
  <pre><code>var params ={
       Bucket: 'exBucket',
       Prefix: 'somePrefix'
  };
  
  s3.listObjects(params, function(Err, Data){
      if(!Err){
        for (var i = 0; i &lt; Data.Contents.length; i++){
           console.log('Listed: ', Data.Contents[i].Key);
           yourArray.push(Data.Contents[i].Key);
        }
      };
  });
  </code></pre>
  
  <p>Here, <code>console.log('Listed: ', Data.Contents[i].Key);</code> gives me the all names. But <code>yourArray.push(Data.Contents[i].Key);</code> doesnt push the names and array is still empty. Where is the mistake ?</p>