Exam4Training

What is the value of output after the code executes?

Refer to following code block:

Let array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,];

Let output =0;

For (let num of array){

if (output >0){

Break;

}

if(num % 2 == 0){

Continue;

}

Output +=num;

What is the value of output after the code executes?
A . 16
B . 36
C . 11
D . 25

Answer: A

Exit mobile version