Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to zip two arrays in javascript

let ladies = ["Elise", "Mary"]
let gentlemen = ["John", "Rick"]

var doubleDate = ladies.map(function(lady, i) {
  return [lady, gentlemen[i]];
});

console.log(doubleDate)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #zip #arrays #javascript
ADD COMMENT
Topic
Name
6+2 =