Ruby - Hashes
Given this Ruby hash, what is the error in accessing the value?
settings = { 'theme' => 'dark', :font_size => 12 }
puts settings.fetch(:theme)settings = { 'theme' => 'dark', :font_size => 12 }
puts settings.fetch(:theme)15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions