Hashes Update

[Solved] Hashes Update | Perl - Code Explorer | yomemimo.com
Question : hashes update

Answered by : testy-termite-rrgxtiyvuz6d

#update hashes in ROR
h1 = { "a" => 100, "b" => 200 }
h2 = { "b" => 254, "c" => 300 }
h1.merge!(h2) { |key, v1, v2| v1 }
h1.merge! "a" => 500

Source : | Last Update : Fri, 11 Mar 22

Answers related to hashes update

Code Explorer Popular Question For Perl