Course of Raku / Essentials / Positional data types / Quoting string arrays
Quiz 1 — Quoting string arrays
Check, for which of the arrays, the element with index 1
contains the letter B
. In other words, say @array[1]
prints B
.
1 | my @array = <A B C>; | |
1 | my @array = 'A', 'B', 'C'; | |
0 | my @array = <'A', 'B', 'C'>; | The elements of this array contain both the quotes and even the comma: 'B', . |
1 | my @array = ['A', 'B', 'C']; | |
1 | my @array = ('A', 'B', 'C'); |
More practice
Course navigation
← Positional data types / Lists | Positional data types / Subscripting ranges →
💪 Or jump directly to the exercises to this section.
Translations of this page: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська