+1 vote
in JavaScript by
What is the output for the following expression?

function test(x) {

while(x < 5)

  { x++; }

return x; }

alert(test(2));

2

5

3

6

1 Answer

0 votes
by
5 (five)

Related questions

0 votes
asked Dec 1, 2022 in JavaScript by john ganales
0 votes
asked Mar 24, 2021 in JavaScript by sharadyadav1986
...