💎 LearnRuby
Lessons Leaderboard
EN RU
Sign In Sign Up
Lessons Leaderboard
Language: EN RU
Sign In Sign Up
Lessons / Hashes
Module 2 Intermediate Ruby 3.4

Hashes

Ruby 3.4

Learn to work with Ruby's powerful key-value data structure.

Exercise (4)

â—‹
1.

Create a Person Hash

Build a hash with person information.

10 points hashes symbols
â—‹
2.

Get Hash Value

Safely retrieve values from a hash with defaults.

15 points hashes fetch
â—‹
3.

Count Words

Count word frequencies in a sentence.

20 points hashes tally
â—‹
4.

Merge Hashes

Combine two hashes with custom merge logic.

20 points hashes merge

Lesson Info

Beginner
Intermediate
Exercise
4
Total Points
65
Ruby Version
3.4
Sign in to start
Back to all lessons

LearnRuby - Learn Ruby 3.4 with interactive exercises