A
Q. Which one of the following is the correct output for the given JavaScript code?
Code:
var a=0;
var b =0;
while (a <3)
{
a++;
b += a;
console.log(b);
}
var b =0;
while (a <3)
{
a++;
b += a;
console.log(b);
}
- Correct Answer - Option(A)
- Views: 5
- Filed under category JavaScript
- Hashtags:
Discusssion
Login to discuss.