Use Lodash.js Library in Workflow script
To use modern features, as map or filter, simply invoke this action and use the variable directly.
Package : fr.numaneo.library
Action : lodashLibrary (with return type Properties)
Script in Workflow :
var _ = System.getModule("fr.numaneo.library").lodashLibrary();
var myarr = [1,2,3];
var myarr2 = [4,5,6];
var concatarr = _.concat(myarr, myarr2);
System.log(concatarr); // [1,2,3,4,5,6];
Please see more functions on lodash website (https://lodash.com/).