Save & Submit button not working in section 2. While Syntax


#1

Every time I try to hit save and submit code, the button just seems to freeze and stays pushed but nothing shows up in the dialogue box telling me anything about my code...
I'm using Chrome, I've refreshed millions of times, restarted my computer... it's been like this for weeks...

Maybe I'm creating an infinite loop without realizing and it's crashing?
Here's my code:

var understand = true;

while( understand = 1 ){
console.log("I'm learning while loops!");
understand = false;
}

Need to proceed with the course so would really appreciate if anyone can help :slightly_smiling:


#2

Hey!

I too am a newbie here but try doing the following instead of the quote above:

while (understand) {

Do let me know if that worked.



#3

hi its becaus this part of your make it become a infint loop because understand will never be equale to 1 so just remove the = 1 so this part of your code should be like that

while(understand)

#4

Thank you so much for your quick response! it works now :slightly_smiling:
You saved the day!


#5

Thank you for getting back to me as well, works now :slightly_smiling:


#6

No problem! You will be told exactly why this is the correct way in the next few lessons. So keep a look out.