javascript charmap code example
Example: characterMapping js
function characterMapping(str) {
let charMap = {}
let max = 0;
let maxChar = '';
for (let char of str) {
if (!charMap[char]) {
charMap[char] = 1;
} else {
charMap[char]++
}
}
console.log(charMap);
}