in Technology by

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

#insurance and Loans 

1 Answer

0 votes
by

Answer:-5

#insurance 

Related questions

0 votes
    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...
asked Feb 25, 2021 in Technology by JackTerrance
0 votes
0 votes
    What is the output for the following code (function f(){ function f(){ return 1; } return f(); function f() { return 2; } })(); 1. NaN 2. 1 3. 2 4. Error...
asked Feb 25, 2021 in Technology by JackTerrance
0 votes
    What is the output for the following code (function f(){ function f(){ return 1; } return f(); function f() { return 2; } })(); a) NaN b) 1 c) 2 d) Error...
asked Oct 9, 2020 in Technology by JackTerrance
0 votes
    Code A: var x = 10; y = --x + 1; alert(y); Code B: var x = 10; y = x-- + 1; alert(y); What is the output for code A and B? 1. 10,11 2. 10,10 3. 11,10 4. 11,11...
asked Feb 23, 2021 in Technology by JackTerrance
+1 vote
    Code A: var x = 10; y = --x + 1; alert(y); Code B: var x = 10; y = x-- + 1; alert(y); What is the output for code A and B? a)10,11 b)10,10 c)11,10 d)11,11...
asked Oct 8, 2020 in Technology by JackTerrance
0 votes
0 votes
    What is the output of [1, 2, 3] + [4, 5, 6]?...
asked Nov 26, 2020 in Technology by JackTerrance
0 votes
    Predict the output of the following JavaScript code.
    What is the output you get for the following code? (function() { return typeof arguments; }) (); 1. arguments 2. array 3. object 4. undefined...
asked Feb 26, 2021 in Technology by JackTerrance
...