title: Async ForEach to map elements of array in Node
body: <p><strong>Objective:</strong> I want to set all values of the array to (valueofIndex + 1) and log the new array in the end.</p>
  
  <pre><code>    **EDIT:**
  </code></pre>
  
  <p><strong>This DOESNT WORK:</strong></p>
  
  <pre><code>var async = require('async');
  
  var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
  
  function attemptAtAsyncEach (arr) {
  
      return async.map(arr, function (member, callback) {
          callback(null, member + 1);
      }, function (err, results) {
          return results;
      });
  }
  
  console.log(attemptAtAsyncEach(arr));
  </code></pre>
  
  <p><strong>THIS WORKS:</strong></p>
  
  <pre><code>var async = require('async');
  
  var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
  
  function attemptAtAsyncEach (arr) {
  
      return async.map(arr, function (member, callback) {
          callback(null, member + 1);
      }, function (err, results) {
          console.log( results);
      });
  }
  
  attemptAtAsyncEach(arr);
  </code></pre>
  
  <p><strong>If I return results</strong> instead of console.log in the callback, why does it show undefined?</p>