Course of Raku / Advanced / Containers / Subscript adverbs 🆕 / Exercises

Delete a key

Problem

Given the hash a => 1, b => 2, c => 3, use a subscript adverb to delete the b entry, then print how many entries the hash has left to show that one was removed.

Example

The program prints:

2

Solution

See the solution

Course navigation

Solution: Does the key exist   |   Solution: Delete a key