Help pls


var count=0

var loop = function(i=0;i,<3;i++){

	while(count<3){ console.log("I'm looping!")
		//Your code goes here!


whats wrong with this?



This is not how functions work.

When declaring a function, inside the parenthesis you establish the parameters that it will look for.

What you're trying to do is make a for loop.

You use for loops, if you know how often you'll loop. The most often used varName in loops is i. (Taken from the JS Glossary, which can be found here.)


for ([var i = startValue];[i < endValue]; [i+=stepValue]) {
    // Your code here


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