Course of Raku / Advanced / Containers / Subscript adverbs 🆕 / Exists and delete
Quiz — Subscript adverbs
What does the following program print?
my %h = a => 1, b => 2;
say %h<z>:exists;| 0 | True |
| 1 | False |
| 0 | Nil |
| 0 | (Any) |
The :exists adverb asks whether the key is present and
returns a Boolean. There is no z key in the hash, so the
answer is False.