Last active
December 27, 2016 18:57
-
-
Save camckin10/14815ab0800f8790e2a054d1b0e43c14 to your computer and use it in GitHub Desktop.
advancedobjects-drills.js
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
//most frequent word | |
function mostFrequentWord(words) { | |
var count = { | |
orange:1, | |
apple:3, | |
kiwi:2 | |
var biggestWord = ""; | |
var biggestCount=0; | |
object.jetys(count).forEach( | |
if (biggestCount < count.word){ | |
biggestCount = count.word | |
biggestWord=word | |
} | |
}); | |
return biggestWord; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment