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.
| 0 | my $a; $a = 42; | Here, the variable is first created and then a value is assigned to it. |
| 1 | my $a = 42; | |
| 1 | my $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: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська