0029 Except_slice

Keys to deal with? 🔑

Hash defines the except method, which allows you to exclude a list of keys. This does not modify the original instance.


The opposite method is slice, which retains only the listed keys. (The equivalent of String#slice!)


Links to Ruby documentation for except and slice.