I am writing a simple js/es5 script to combine all the strings in a CWL. The CWL only supports ES5, so there are many functions/features from ES6 cannot be used. I am not familiar with js in general.
For a minimal example:
var arr1 = ["a", "b"]
var arr2 = ["111", "222"]
Expected result:
["a_111", "b_111", "a_222", "b_222"] // order doesn't matter
I tried this way, but it did not work and returned [null, null]
arr1.map(function(x) {
arr2.map(function(y) {
return x + "_" + y;
});
});