Last active
September 29, 2017 20:43
-
-
Save iseitz/e9cda0f02a35a4a5369a8ff9385b91f0 to your computer and use it in GitHub Desktop.
Find the maximum value in the hash - Ruby (vowels, words count, temperature etc)
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
max = -1 | |
vowels_hash.each do |vowel, frequency| | |
if frequency > max | |
max = frequency | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment