Answers for "create hash ruby"

0

create a new hash from existing hash ruby

data = {name: 'akshay', last_name: 'kakade'}
new_hash = Hash[data]
data.object_id
new_hash.object_id
Posted by: Guest on October-15-2021
0

ruby assign value to hash

grades = Hash.new
grades["Dorothy Doe"] = 9
Posted by: Guest on June-24-2020

Browse Popular Code Answers by Language