let str = "AllThe-small Things"
str = str.replace(/([a-z])([A-Z])/g, "$1 $2");
console.log(str);
**// output is:All The-small Things**
*What difference between those two code blocks? Normally, I know I have 3 capture groups on that sample. The one is for lower case the other is for uppercase and the last one is for the main string. But, I didn’t understand that groups clearly.What I am missing here? *
let str = "AllThe-small Things"
str = str.replace(/([a-z])([A-Z])/g, "$2 $1");
console.log(str);
**// output is:AlT lhe-small Things**