User:RakuProgrammingCode

A Basic Array In The Raku Programming Language. Here An Optional Function / Subroutine Has Been Incorporated Into This Code Example.

sub new-array{

my @first-array = ("Bill","Bob","Ted","Fred");

say @first-array;

}

new-array;


 * 1) output = [Bill Bob Ted Fred]

Accessing Elements In The Raku Array.

sub new-array{

my @first-array = ("Bill","Bob","Ted","Fred");

say @first-array[0];

say @first-array[1];

}

new-array;


 * 1) output1 = Bill


 * 1) output2 = Bob