Learn Ruby
Hash
15.1
Lesson

Use new to create a hash

So far we have seen hash being created like this.

There is another way to create hash also.

Hash.new creates an empty hash. To this empty hash we need to add key and value.