Skip to content

Instantly share code, notes, and snippets.

@iseitz
Last active September 29, 2017 20:43
Show Gist options
  • Save iseitz/e9cda0f02a35a4a5369a8ff9385b91f0 to your computer and use it in GitHub Desktop.
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)
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