While loops error message


This code doesn´t work. Please, could you help-me ? Thank you

var count = 0;

var loop = function (displayMsg) {
	//Your code goes here!

loop ("I´m looping");

The error message is:
Ops, tente outra vez. It looks like you're not printing the right string to the console.



Can we get the link for the exercise? Thanks.


Hi flavioibr :slight_smile:

The problem's that you are using "I´m looping" instead of "I'm looping!" (note the difference carefully)

P.S. Your count variable should be declared inside the function, so that it begins from zero every time you call it. Right now it is global so it would work for only one call because after that it would be 3 and the condition thus false.