Course of Raku / Essentials / Code blocks / Lexical scope

Quiz — Lexical scope

What does this program print?

my $a = 1;
my $b = 2;
{
    my $a = 3;
    $b = 4;
    my $c = 5;
}
my $c = 6;

say "$a$b$c";
146 Ouput of the program: (: 125, 126, 145, 146, 325, 326, 345, 346 :)

Course navigation

Code blocks   |   Code blocks / Global variables