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.

0029-except_slice_1.png

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

0029-except_slice_2.png

Links to Ruby documentation for except and slice.