I have array of strings
const arr = ['some', 'word', 'anotherverylongword', 'word', 'yyy', 'u']
const joined = arr.join(';')
I want to get array of chunks where joined string length is not greater than 10
for example output would be:
[
['some;word'], // joined string length not greater than 10
['anotherverylongword'], // string length greater than 10, so is separated
['word;yyy;u'] // joined string length is 10
]