Stuck on my code #5


I should create my personal while loop. but somehow I think I didnt quite get it. Therefore my code is somehow not complete... I should add a way, how the var "count" adds up, but somehow I dont know where to put it.

I tried putting it into the parantheses of the while condition: while(count<3; count++) but this results in "SyntaxError: unexpectet token"...

I should also have a third way to print out code into the console... but cant think of any.

var count = 0;

var loop = function(){
		//Your code goes here!
		console.log("I'm looping!");
		return "I'm looping!";
		return "I'm looping!";



You should increment count inside your while-statement.
And also, the return statement exits the loop. (remove those)


You could do this rather!

console.log("I'm looping!"); count++;


thank you so much! the first part is solved then :slight_smile: now my problem is, I mustnt use console.log more then once...


lol got it ^^ im sorted, just misunderstood the instructions XD


You're welcome.

Have fun coding! :slight_smile:


Was very confused about this step. Thanks for the clear instructions!


You're welcome.

Have fun coding! :smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.