I believe that arrays can be joined and then put into a string with a custom separator like this:
var a1 = ["apple","orange"];
var a2 = ["hot", "cold"];
var a3 = a1.concat(a2);
var str = a3.join("_");
However, the result would be:
apple_orange_hot_cold
I am looking to join each member of a1 with the corresponding a2 member, where correspondence happens by order in the array. Assume that number of members in a1 always equals the number in a2. So, i'd like the output to be a string that looks like this:
apple_hot_orange_cold
What is the best way to accomplish this?