×

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:31 PM
Views: 20
Tags: no tags
codeschool
  1. var passengers = [ ["Thomas", "Meeks"],
  2. ["Gregg", "Pollack"],
  3. ["Christine", "Wong"],
  4. ["Dan", "McGaw"] ];
  5.  
  6.  
  7. var joinInRow = function (arr) {
  8.         var newArr = [];
  9.         for(var i = 0; i < arr.length; i++) {
  10.                         var ime = (arr[i].join(" "));
  11.                         newArr.push(ime);
  12.         }
  13.         console.log(newArr);
  14. };
  15.  
  16. joinInRow(passengers);