title: Is map() in javascript synchronous?
body: <p>Function is :</p>
  
  <pre><code>[1,2,3].map( function (item)
  {
    console.log(item);
    //return 'something';
  });
  </code></pre>
  
  <p>My expected behaviour is getting only 1 as output, unless i uncomment the </p>
  
  <pre><code>//return 'something'
  </code></pre>
  
  <p>But i really get</p>
  
  <pre><code>1
  2
  3
  </code></pre>
  
  <p>What am i doing wrong ?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>i am testing that with nodejs.</p>
  
  <p>i really dont understand.</p>
  
  <pre><code>var async = require("async");
  
  [1,2,3].map( function (item)
  {
        console.log(item);
        //return 'something';
  }); 
  async.map([1,2,3], function (item,callback)
      {
          console.log(item);
          //callback(null,true)
      }, function (err,result)
          {
              console.log(result);
          }
  );
  </code></pre>
  
  <p>Both return the same</p>
  
  <pre><code>1
  2
  3
  </code></pre>
  
  <p>And i really would like to wait till i get a return or a callback till the next item is executed.</p>
  
  <p><strong>SOLVED</strong></p>
  
  <pre><code>async.mapSeries([1,2,3], function (item,callback)
      {
          console.log(item);
          //callback(null,true)
      }, function (err,result)
          {
              console.log(result);
          }
  );
  </code></pre>
  
  <p>is the way to do it.</p>