JavaScript: Get the count of a character repeated in a given string
const mainStr = 'str1,str2,str3,str4strings';
const repeatedStringCount = [...mainStr].filter(l => l === 's').length;
console.log(repeatedStringCount);
Output:
6
Execute above code here