10/11 Page freezes


Hi there

Everytime I type my code in the script.js part, the page seems to freeze and so I can't do anything else after that.
It's the only page I've experienced so far on codeacademy, can anyone help?

Thanks in advance for your help!


Sound like an infinite loop could you post the code?


here's what I got to work, I hope it can help... by changing getToDaChoppa to false I'm stopping the code

var getToDaChoppa = function(){
// Write your do/while loop here!
do { console.log("I'm printing this part of the loop now!"); } while (getToDaChoppa = false)



Sry but this is not a good idea:

while (getToDaChoppa = false)

sure it works because in the end it just means false but it's a really bad habit. At first never use the name of your function as a variable inside of your function. The idea of functions is that the code can be used multiple times, this can't because this:

getToDaChoppa = false

overwrites your function with false.As an assignment it has the value that is assigned so false which works but really rather just use false instead or use a variable with a different name and a value of false but don't make this a habit.


many thanks for the info haxor789, I appreciate the help