I don't understand this exercice


#1


https://www.codecademy.com/fr/courses/javascript-beginner-fr-FR-7kz5w/1/1?curriculum_id=5355c2b7516bcbd912000008#

no error message, i just don't understand how to write the code for this exercice. i'm very stuck on it!


// Rappelez-vous de définir votre condition en dehors de la boucle !
var compte = 0

var boucle = function(){
	while(){
		console.log("Je tourne !");
	}
};

boucle(3);


#2

Hi you just need to finish the while statement
you got

var compte = 0;

while(){
	console.log("Je tourne !");
}

here an example of a while statement

var count = 0;

while (count < 3) {
    console.log("I run!");
    count++;
}
#output
I run!
I run!
I run!

then when you calle the function boocle you don't need to put anything inside it..

#call the function

boocle();

because the function boocle doesn't have any argument


#3

hooow, thank you so much, i understand the way to code this.

So to creat 3 time the text "I run" in the console, i musn't use multiplicate because i have used while (count<3), that's right?

sorry for my question but i m searching to understand my mistake ^^

thank you a lots


#4

I don't uderstand the multyplicate...
but the while statement is execute as long as the condition is true so yes if you want to print 3 time "I run" you should put (count<3)

while (conditon) {
    #do something as long as the condition is true
    #increment ;
};