Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript combine two index elements

var array1 = [1, 2, 3, 4];
var array2 = ["a", "b", "c", "d"];

var newArray = array1.map((e, i) => e + array2[i]);
console.log(newArray);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #combine #index #elements
ADD COMMENT
Topic
Name
6+5 =