Skip to main content
All lessons

Hashes

8 min · Ruby

Store values under named keys instead of numbered positions.

Ruby · Hashes0/5 cleared

Enemy 1 of 5

A hash holds key-value pairs: { name: "Ada", score: 10 }. Look up with hash[:key] or hash["key"].

You
Goblin Glitch

Loading editor...

Ln 1, Col 1Spaces: 4
Sign up to fightTarget output: Ada