js split by capital letter code example
Example 1: javascript separate words by capital letter
"thisIsATrickyOne".split(/(?=[A-Z])/);
Example 2: js split string on capital letter second
'ThisIsTheStringToSplit'.split(/(?=[A-Z])/); // positive lookahead to keep the capital letters