Created
December 11, 2011 14:46
-
-
Save niyazpk/1460929 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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