Problems :/


#1

var count= 0;

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

var loop =function (count){
while (count<3){
count++;
console.log("I'm looping!");
}
return count;
};
console.log(loop(count));
console.log(count);
//what is my fault here , its saying that""'Oops, try again.
Hey now--only one console.log() call!""


#2

Instructions
Write a while loop that logs "I'm looping!" to the console three times.
You can do this however you like, but NOT with three console.log calls.
Check the Hint if you need help!

First create a var that counts like you did:

var count = 0;

Than we build a loop function

var count = 0; 

var loop = function(){

};

Inside that function we make the while loop

    var count = 0; 

    var loop = function(){
         while(){

         }
    };

This loop should run three times and we know count === 0

var count = 0;

var loop = function(){
     while(count <= 3){

    }
};

Now we log I'm looping!

var count = 0; 

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

We dont want a infnite loop so we count count up

 var count = 0; 

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

And after all we call the function

  var count = 0; 

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

  loop();

That should be all


#3

that was most helpfull man , thankl you very mush