javascript combine two index elements

Solutions on MaxInterview for javascript combine two index elements by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "javascript combine two index elements"
Benjamin
17 Feb 2018
1var array1 = [1, 2, 3, 4];
2var array2 = ["a", "b", "c", "d"];
3
4var newArray = array1.map((e, i) => e + array2[i]);
5console.log(newArray);