let str="hell"
var count = {};
for (let i = 0; i < str.length; i++) {
var ch = str[i];
if (count[ch] > 0) {
count[ch]++;
} else {
count[ch] = 1;
}
}
for(let i in count){
console.log(i,count[i])
}
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)