Key Concepts

Review core concepts you need to learn to master this subject

Ruby Symbols

my_bologna = { :first_name => "Oscar", :second_name => "Meyer", :slices => 12 } puts my_bologna[:second_name] # => Meyer #Symbols must be valid Ruby variable names and always start with a colon (:).

In Ruby, symbols are immutable names primarily used as hash keys or for referencing method names.

Hashes and Symbols
Lesson 1 of 2