"Error: Access is denied." 5/11. Driving me crazy


#1
//Remember to set your condition outside the loop!
var count = 0;

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

loop();

Everything is good when I run it in another program but on codecademy I get the Access is denied error. I really need help!


#2

Try to remove a semicolon from here : count++;


#3

Hmmm... this is unusual. I have tried the exact same thing that you did, and it works. :neutral_face:


#4

I have noticed that sometimes I need to refresh my codeacademy and write the same code once again and then it works :confounded:


#5

No that semicolon is fine where it is. But you're right refreshing the page sometimes helps because it resets the javaScript and deletes garbage that kept in the memory from previous fails. But normally don't have to rewrite it unless there was a real error.
@czary
Did refreshing the page helped?


#6

Yes it did :smile:! Thank you!


#7

The same thing happened to me! It drove me crazy! I just now reloaded the page and it works! Thanks, I guess...? :grin: