Check out example codes for "ruby assign value to hash". It will help you in understanding the concepts better.

Code Example 1

grades = Hash.new
grades["Dorothy Doe"] = 9

Code Example 2

my_hash = Hash.new #=> { }
# OR
my_hash = {}

Learn ReactJs, React Native from akashmittal.com