2 strings capital starts with capital javascript code example
Example 1: javascript separate words by capital letter
"thisIsATrickyOne".split(/(?=[A-Z])/);
Example 2: find capital word in string javascript
const str = "HERE'S AN UPPERCASE PART of the string";
const upperCaseWords = str.match(/(\b[A-Z][A-Z]+|\b[A-Z]\b)/g);
console.log(upperCaseWords);