title: What is the concept of Array.map?
body: <p>I am having problems understanding the concept of <code>Array.map</code>. I did go to Mozilla and Tutorials Point, but they provided very limited info regarding this.</p>
  <p>This is how I am using <code>Array.map</code>. It is a little complex (a bit of d3.js involved; just ignore it)</p>
  <pre><code>var mapCell = function (row) {
      return columns.map(function(column) {
          return { column : column, value : getColumnCell(row, column) }
      })
  }
  //getColumnCell is a function defined in my code
  //columns is array defined at the top of my code
  </code></pre>
  <p>I do not understand exactly what this code is doing. I know its returning a new array and stuff but this part is a little tricky!</p>
  <p>If you want to go through my code: <a href="http://jsfiddle.net/ddfsb/2/" rel="nofollow noreferrer">http://jsfiddle.net/ddfsb/2/</a></p>
  <p>I am using console to actually understand what's happening inside the code. Looking at the answers provided, I have clearly understood the concept of <code>array.map</code>. Now the only part remaining is parameters rows and columns, but there is a difference between row and rows, and column and columns in the fiddle provided</p>
  <pre><code>var rows//completely ok
  var columns//completely ok
  funcion(row)//here,source of row is unknown.getColumncell function utilizes this parameter further making it more critical
  function(column)//source of column is unknown..getColumncell function utilizes this parameter further making it more critical
  </code></pre>