Question: The function takes a string and returns a map with the character counts. The keys to the map are the characters, the value is the
The function takes a string and returns a map with the character counts. The keys to the map are the characters, the value is the number of times it occurs in the string. function characterCount(input) |{ var counts = {}: for(var i = 0;i 1) counts[char] + = 1: else counts[char] = 1: } return counts: }
I need help solving this question. It just has a bug and I cant find it.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
