# What is the output for the following function test(x) { while(x < 5) { x++; } return x; } alert(test(2)); 6 3 2 5

What is the output for the following
function test(x) {
while(x < 5)
{ x++; }
return x; }
A) 6
B) 3
C) 2
D) 5

#insurance and Loans

#insurance

## Related questions

What is the output for the following function test(x) { while(x < 5) { x++; } return x; } alert(test(2)); 1. 6 2. 3 3. 2 4. 5...
(i) x=5, y=6,2=20 Q8) Consider the following statements and describe the output/statement required: ... multiple assignment statements. Select the correct answer from above options...
A random variable X has the following probability distribution : X: 1 2 3 4 5 6 7 8 P(X): 0.15 0.23 0.12 0.10 0.20 0.08 0.07 0.08 for the events E=[X is a prime number] F={X...
A random, variable X has the following probability distribution: X : 0 1 2 3 4 5 6 7 P(X):0 k 2k 2k 3k k^2 2k^2 7k^2+k Find each of the following: k ii. P(X...
What is the output of [1, 2, 3] + [4, 5, 6]?...
Let X and Y be two events such that P(X/Y) = $$\frac{1}{2}$$ , P(Y/X) =$$\frac{1}{3}$$ and P(X∩Y) =$$... (d) P(XC∩Y) = \(\frac{1}{3}$$ Select the correct answer from above options...
If X and Y are two events such that PX//Y)=(1)/(2), P(Y//X)=(1)/(3) and P(XcapY)(1)/(6). Then, ... D. P(X^(c )capY)=1//3` Select the correct answer from above options...