How do I use for loops in js to overlay loops on a 3-bit basis?

problem description

for example, I now have the following array var a = [1, 2, 5, 3, 5, 5, 6, 8, 9];
I want to arrange the circular output in the order of 1, 2, 3 / 4, 5, 6 / 7, 8, 9

the environmental background of the problems and what methods you have tried

I try to use for (j = 0; j < data.files [I] .item.length; j + = 2)
but the result is not the same as expected, how can it be realized?

Apr.07,2021


var a = [1, 2, 3, 4, 5, 6, 7, 8, 9];
a.reduce((res, item, index) => {

  if (index % 3 === 0) {
    return res + '/' + item
  }
  return res + ',' + item
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a932-2c218.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a932-2c218.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?