Hashes • Exercise 4/4

Merge Hashes

00:00
0
20 points

Instructions

Create a function merge_with_sum that takes two hashes with numeric values
and returns a new hash where values for matching keys are summed.

Example:
```ruby
merge_with_sum({a: 1, b: 2}, {b: 3, c: 4})

=> {a: 1, b: 5, c: 4}

Your Code

Results

Click "Run Tests" to see results