+1 vote
in Class 12 by kratos

Give the output of the following code segment:

var sum, a;

sum = 0;

a = 1;

do

{

sum = sum + a;

a = a+2;

}while(a<=8)

document.write(sum);

1 Answer

+3 votes
by kratos
 
Best answer

The output is :

16

...