Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Java Script Level 5 Lesson 4.

// I am facing problem with Java Script Level 5 Lesson 4. Below given is my code://

let i = 0;
do{
console.log(+i);
i += 5;
}while(i<=50);
by

2 Answers

manujayakumar
let i = 0;
do{
i += 5; // 5 is added with the current value of "i".
console.log(i); //value of "i" is printed.
}while(i<=50); //condition checks wheather the value of "i" is lesser than equal to 50, and the loop continues till the
condition is true.
Ashutoshry6u3
//Accepted
let i = 0;
do
{
console.log("--" + i + "--");
i += 5;
}while(i<=50);

Login / Signup to Answer the Question.