Totally confused, Im sure it's simple, Help! 'While" loop and 'for' loop


Write two loops in the editor: one while, one for. No restrictions on this one; just make sure your loops are syntactically correct, and be careful to avoid infinite loops!

this is my code:

while (i=0) {
console.log(“While loop.”); } {
i++; };
for (var i = 0; i<=1; i+1) {
console.log(i); };

or now…

int i=0;
while (i=0) {
console.log(“While loop” + “i”);

i++; };
for (var i = 0; i<=1; i++) {
console.log(i); };


Read the documentation
the for-loop:

the while-loop:

the do-while-loop:


thank you. I figured it out!