Skip to content

Instantly share code, notes, and snippets.

@niyazpk
Created December 11, 2011 14:46
Show Gist options
  • Save niyazpk/1460929 to your computer and use it in GitHub Desktop.
Save niyazpk/1460929 to your computer and use it in GitHub Desktop.
// The following will fail if word ==== 'constructor' ...
function bump_count(word) {
if(word_count[word]){
word_count[word] += 1;
}else{
word_count[word] = 1;
}
}
// ... because there is already a 'constructor' for objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment