In some languages split splits letters like ž or č to 2 different characters in array. I'm trying to split word 'žaliuojančiuose' by single letter, as a result of splitting I got:
['z', '̌', 'a', 'l', 'i', 'u', 'o', 'j', 'a', 'n', 'c', '̌', 'i', 'u', 'o', 's']
My code:
const letters = title.textContent.split('');
And also tried 'match' instead of 'split', same result:
const words = title.textContent.match(/\S/g);
I'd greatly appreaciate any advice!