Javascript: Map

(Last Updated On: )

You can use the map function to return different results from an array to return a new array with new data.

For example if you want to build an array of controls you could do the following.

  1. var newControls = myDataArray.map(function(rec, index){
  2. return <div></div>;
  3. });