...

/

Hash Syntax Confusion (optional)

Hash Syntax Confusion (optional)

This lesson focuses on giving an introduction on the two types of syntaxes of Hash used in Ruby.

You can skip the following and jump right to the next chapter, or you can keep reading if you’re curious.

We’ve found it’s important for us to explain the following somewhere in our course, because many online resources use another, alternative syntax for defining Hashes.

💡

The term syntax, in programming, refers to ways to use punctuation in order to (amongst other things) create objects.

E.g. the fact that we can use square brackets [] and commas , in order to define Arrays, and curly braces {} and hash rockets => in order to define Hashes, is part of Ruby’s ...

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy