i want to split an array into a list of subarray by a/or more given seperator/s.
something like this:
var myArray = [null, 5, 'whazzup?', object, '15', 34.6];
var mySeperators = [null, '15'];
splitArray(myArray, mySeperators)
should result in that:
[[], [5, 'whazzup?', object], [34.6]]
the source array can contain the seperators multiple times. how to accomplish this?
when it makes solution easier, i'm using mootools as base library.