Symbol keys vs string keys decision
📖 Scenario: You are building a simple contact list app. Each contact has a name and a phone number. You want to store this information in a Ruby hash.
🎯 Goal: Learn how to create hashes with symbol keys and string keys, and decide which one to use for your contact list.
📋 What You'll Learn
Create a hash with string keys for name and phone
Create a hash with symbol keys for name and phone
Compare accessing values using string keys and symbol keys
Print the results to see the difference
💡 Why This Matters
🌍 Real World
Storing and accessing data in hashes is common in Ruby apps like contact lists, settings, and configurations.
💼 Career
Understanding symbol vs string keys helps write efficient and clear Ruby code, a valuable skill for Ruby developers.
Progress0 / 4 steps