Working with Symbols
Learn about symbols and how they’re different from strings.
What are symbols?
Symbols are like strings, but they’re code. Symbols are a rather strange concept. We only introduced them here because they’re used so often and widely that we’ll very likely find them used in code elsewhere.
A symbol is written like this: :something
. That is, a word preceded by a colon. This means that symbols typically don’t contain spaces. Instead, if we have symbols that consist of multiple words, we would concatenate them with underscores, like so: :another_funny_symbol
...