What is the output of these lines of code?

Consider the following lines of code:
sub mySub {
$_ = @_[1];
$a = shift;
$b = shift;
return $a * $b * $_;
}
mySub(1,2,3);
What is the output of these lines of code?

Consider the following lines of code:
sub mySub {
$_ = @_[1];
$a = shift;
$b = shift;
return $a * $b * $_;
}
mySub(1,2,3);
What is the output of these lines of code?

A.
No output results from this code.

B.
6

C.
2

D.
4



Leave a Reply 0

Your email address will not be published. Required fields are marked *