Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Javascript :: js remove element by tagname 
Javascript :: update node mac 
Javascript :: how to check if element is in viewport 
Javascript :: array loop js 
Javascript :: javascript split array into chunks 
Javascript :: js escape ampersand 
Javascript :: pandas to json 
Javascript :: create hash in node js 
Javascript :: hide / show jquery 
Javascript :: javascript cookies 
Javascript :: array comprehension javascript 
Javascript :: fs node delete folder 
Javascript :: maximum product of word 
Javascript :: refresh page js 
Javascript :: scroll to bottom of an element 
Javascript :: javascript get random array item 
Javascript :: Iterate Odd Numbers With a For Loop 
Javascript :: javascript how to get every element after the 1st in an array 
Javascript :: mongoose count documents 
Javascript :: delete attribute javascript 
Javascript :: how to get the current date and time in javascript 
Javascript :: Concatenating variables and strings in React 
Javascript :: how to get browser url in javascript 
Javascript :: popup alert in flutter 
Javascript :: js extract options from select 
Javascript :: javascript disable context menu 
Javascript :: find last element with class jquery 
Javascript :: jquery on checkbox checked es6 
Javascript :: how to exclude a specefic tagname from a javascript query search 
Javascript :: javascript get child by name 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =