Do/while loop #11


so I just completed this section. But I have a question about the variables.

here is the first part of the code I used

var Wil = 0

for (var i= 10; i < 100; i+= 5)
{console.log (i);}

while (Wil < 4)
{console.log ("Wil is the MAN!!");

I know it is basic. But how would I write a do/while loop here calling on the variable I have already defined, var Wil=0

i tried but I can't seem to figure out how to make it false in the end so that it stops running.

To complete the section I simply created a new variable to use in my do/while loop.



If you're talking about making a do / while loop, you mean:

//insert code here


Because otherwise your code looks like it should work with the "while" loop that you're using.


Hi @wilcarter

@lolman your answer is nearly good, you have to add something else :

//insert code here

Hold on :wink:


Right, I was thinking of Ruby, good catch!