I\'m stuck with the following problem: I need to find repeated characters in a string. Basically what I want is regular expression that will match like that
function charCount(str){ let arr = str.split(''); return arr.reduce((a,p)=>{ a[p] = a[p] ? (a[p]+1) : 1; return a; },{}); };