5/11 Practice Makes Perfect


#1

https://www.codecademy.com/courses/javascript-beginner-en-ASGIv/1/1?curriculum_id=506324b3a7dffd00020bf661#

When I log the following, the website responds with "Oops, try again. Are you logging 'I'm looping!' to the console three times?" and the console displays no instances of it being logged (it's completely blank). Someone help me out here?


var count = 0

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

loop();


#2

for the first iteration, the condition:

0 > 3

is false, so the loop never runs

And you need to pass count as argument on function call, or you function shouldn't have a parameter


#3

Ah, thanks, that really helped. I dun goofed.


#4

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