Skip to content

Instantly share code, notes, and snippets.

@niyazpk
Created December 11, 2011 14:49
Show Gist options
  • Select an option

  • Save niyazpk/1460949 to your computer and use it in GitHub Desktop.

Select an option

Save niyazpk/1460949 to your computer and use it in GitHub Desktop.
// The following code will fix the problem
function bump_count(word) {
if(typeof word_count[word] === 'number'){
word_count[word] += 1;
}else{
word_count[word] = 1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment