7 lines
207 B
Raku
7 lines
207 B
Raku
@array = ( 1 .. 10 ); # create array containing 1-10
|
|
|
|
foreach $number ( @array ) { # for each element in @array
|
|
$number **= 2; # square the value
|
|
}
|
|
|
|
print "@array\n"; |