How do I slice an array like this:
var a = [1, 2, 3, 4, 5, 6 , 7, 8];
into thirds (ie. three arrays, like this):
[1, 2, 3]
[4, 5, 6]
[7, 8]
Here's what I've got so far:
var first = a.slice(0, Math.ceil(a.length / 3));
var seconds = ???
var third = ???