Course of Raku / Essentials / Variables and data types essentials / Scalar variables / Declaration with initialization

Quiz 2: Declaration and initialization or declaration with initialization

Mark those one-line programs that have declaration with initialization in a single go.

0my $a; $a = 42;Here, the variable is first created and then a value is assigned to it.
1my $a = 42;
1my $a = 42; my $b = $a;You can use the variable to initialize another variable.

Course navigation

Quiz 1: Declaration with initialization   |   The defined-or operator

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