Course of Raku / Essentials / Associative data types / Pairs

Quiz — Pairs

1

Complete the program to print the following output:

India
New Delhi

Here is the program:

.my $city = India => 'New Dehli';
keysay $city.␣␣␣␣;
valuesay $city.␣␣␣␣;

2

What does this program print?

my $data = 1 => 2;
say $data.WHAT;
(Pair)Output: (: (Int), (Array), (Pair) :)This is a pair Pair $data = 1 => 2, where both the key and the value are integers.

Course navigation

Pairs   |   Hashes

Translations of this page: EnglishDeutschEspañolItalianoLatviešuNederlandsБългарскиРусскийУкраїнська