I want to count the number of occurrences of each character in a given string using JavaScript.
For example:
var str = \"I want to count the number
Hope this helps someone
function getNoOfOccurences(str){ var temp = {}; for(var oindex=0;oindex