Course of Raku / Essentials / Typed variables

Using of

Here is another possible syntax to restrict the type of the scalar container:

my $var of Int;
my $str of Str = 'Hello';

Course navigation

Typed variables / Type constraints   |   Typed variables / Type conversion for typed variables


💪 Or jump directly to the exercises to this section.

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