Hash and types
person = {
"name" => "Foo Bar",
"number" => 42,
}
p! person
puts typeof(person) # Hash(String, Int32 | String)
person # => {"name" => "Foo Bar", "number" => 42}
Hash(String, Int32 | String)
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
person = {
"name" => "Foo Bar",
"number" => 42,
}
p! person
puts typeof(person) # Hash(String, Int32 | String)
person # => {"name" => "Foo Bar", "number" => 42}
Hash(String, Int32 | String)