I want to take an array output like the following:
[a,
b,
c,
d,
e,
f]
and slice it into sections, then output each new array on a newline like this:
[a,b
c,d
e,f]
Here's what i have so far:
var data = "";
for (i = 0; i < 4; i+=2) {
data += output.slice(i,2);
}
return data;
I've been working at this for some time now trying different things to make this work but no luck. I'm new to JS, so i need some help.