Splitting the array into pairs.
Hi,
I have array with numbers and i want to create pairs from this table, like this:
var doc = app.activeDocument;
var table = ["1", "2", "3", "4", "5", "6", "7", "8", "9","10"]; // the table will be variable so the number of pairs will be variable too there can be 2-4 numbers and it can be 30.
//some magic function or loop
var pairs = {
1. pair = ["1", "2"]
2. pair = ["2", "3"]
3. pair = ["3", "4"]
4. pair = ["4", "5"] etc.
} ;