×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Randy Marsh
Added: Feb 1, 2014 3:29 PM
Views: 13
Tags: no tags
code school
  1. var passengers = [ ["Thomas", "Meeks"],
  2.                    ["Gregg", "Pollack"],
  3.                    ["Christine", "Wong"],
  4.                    ["Dan", "McGaw"] ];
  5. var modifiedNames = passengers.map(function (firstAndLast) {
  6.           return firstAndLast[0] + " " + firstAndLast[1];
  7.         }
  8. );
  9.  
  10. console.log(modifiedNames);
  11.