5/11 "Practice makes perfect" - what exactly does "loop();" do?


here is my code:
var count = 0;

var loop = function(){
while(count < 3){
console.log("I'm looping!");
count += 1;

my code works but i just don't understand what exactly "loop();" does? What are its purposes & roles? can someone provide me some explanations? Thanks


I've the same question. Can somebody explain it?


You wrapped your while loop in a function and loop() calls this function so the code in it can get executed.


Thank you so much :wink: things r now pretty clear to me :+1: