showing results for - "concat two arrays each value react typescript"
Nelson
18 Jan 2020
1var array1 = [1,2,3,4];
2var array2 = [5,-6,7,8.5];
3
4const concatArr = (arr1, arr2, sep) => arr1.map(function (num, idx) {
5  return num.toString().concat(sep,(arr2[idx]).toString())
6});
7
8console.log(concatArr(array1,array2,"#")) //["1#5", "2#-6", "3#7", "4#8.5"]
similar questions