I use some javascript library for drawing charts. It need to pass arrays with coordinates in to chart initializer. But chart initializer function have a signature looks like new function ([arr1], [arr2], [arr3]), but I don't know how much arrays I will pass into that, but it impossible to initialize it another way. How it possible to solve this? Thanks.
UPD: function called is constructor, so it's not work correctly with apply. Problem is how to pass data, but not how to get the count of passed data