how to zip two arrays in javascript

Solutions on MaxInterview for how to zip two arrays in javascript by the best coders in the world

showing results for - "how to zip two arrays in javascript"
Rolando
01 Mar 2018
1let ladies = ["Elise", "Mary"]
2let gentlemen = ["John", "Rick"]
3
4var doubleDate = ladies.map(function(lady, i) {
5  return [lady, gentlemen[i]];
6});
7
8console.log(doubleDate)