const data = [
{
id: 1,
date: '29.04.2022',
first: 12,
second: 6,
third: 0,
foutrh: 0,
fifth: 10,
balls,
},
{
id: 2,
date: '30.04.2022',
first: 6,
second: 6,
third: 0,
fourth: 10,
fifth: 10,
balls,
},
]
new Array(15).fill('').map((_, i) => i / 3 & 1 ? '+' : '-').join(',')
"-,-,-,+,+,+,-,-,-,+,+,+,-,-,-"
new Array(15).fill().map((_, i) => i)
.reduce((acc, c, i) => {
if (i % 3 === 0) acc.push([]);
acc[acc.length - 1].push(c);
return acc;
}, []);
// "[[0,1,2],[3,4,5],[6,7,8],[9,10,11],[12,13,14]]"