For and While loops in functions?

For and While loops in functions?
0

#1

Why am I having such a hard time, I can’t believe it…

Log the numbers 1 - 10…

function yourCode(console) {
  for (var i=0; i<11; i++){
	}
console.log(console[i])
}

#2

Console.log is not in the for loop


#3

try putting the log inside the bracket scope…
{
log here
}


#4

Still doesn’t work? I’m not sure what the problem is. Still get undefined.


#5

Please repost your latest code.


#6
function yourCode(console) { 
    for(let i=0; i<11; i++){
        console.log(i)
    }
  }

I’m just really bad with arguments passing through functions. I never know which to return.


#7

Nevermind, I solved it. Thanks.