1
2
3
4
5
6
7
8
9
10
11
12
13
14
var m = [1, 2, 3]
var n = ['a', 'b', 'c']
function foo(arr1, arr2) {
let result = ''
let x = arr1.join('')
let y = arr2.join('')
let num = arr1.length
for (let i = 0; i < num; i++) {
result += x.charAt(i) + y.charAt(i)
}
return result
}
foo(m, n)
console.log(foo(m, n))