What is the result of these lines of code?

Consider the following lines of code:
@array1 = (“apples”, “oranges”, “pears”, “plums”);
foreach (@array1) {print “$_\n”};
What is the result of these lines of code?

Consider the following lines of code:
@array1 = (“apples”, “oranges”, “pears”, “plums”);
foreach (@array1) {print “$_\n”};
What is the result of these lines of code?

A.
applesorangespearsplums

B.
apples oranges pears plums

C.
apples

D.
apples
oranges
pears
plums

Explanation:
apples
oranges
pears
plums



Leave a Reply 0

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