But would that be easy for end user from a UI perspective?
Say I want to concatenate an array with an undefined number of arrays in one go. Not by chaining 15 concat functions
I was thinking that the end user could input in the enum type the arrays he needs(one per enum parameter) and I could pass that undefined number of arrays to the function to concatenate.
var length = arguments.length;
if (!length) {
return [];
}
var args = Array(length - 1),
array = arguments[0],
index = length;
while (index--) {
args[index - 1] = arguments[index];
}