How to split string to strings of equal length in JavaScript?