0
How to question an exercise
I am new to this. How do I complain/ask for clarification about exercises. In this one var x = 0; while(x<6) { x++; } document.write(x); It says the answer is just 6. Why isn't it 0-6. If it was x+=6; I would understand but it's not and I don't. Martin Nicol
2 odpowiedzi
+ 4
Voleti Varshith , please use appropriate tags (e.g. programming language) for your question. Thanks!
+ 3
var x = 0;
while(x<=6) {
x++;
document.write(x);
}
Use the document.write inside the while loop you have used outside the while loop.