Browser crashes after creating the @while

Browser crashes after creating the @while
0

#1

Tell us what’s happening:

Everytime i try write the code, the whole fan in my browser stops working and i have to restart my browser. I can’t get any further…

The problem

Your code so far

$x: 5;
@while $x < 50 {

} // Problems happens here, when i type the LAST curly bracket.


<style type='text/sass'>
  
  
  
</style>

<p class="text-1">Hello</p>
<p class="text-2">Hello</p>
<p class="text-3">Hello</p>
<p class="text-4">Hello</p>
<p class="text-5">Hello</p>
<p class="text-6">Hello</p>
<p class="text-7">Hello</p>
<p class="text-8">Hello</p>
<p class="text-9">Hello</p>
<p class="text-10">Hello</p>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:63.0) Gecko/20100101 Firefox/63.0.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/sass/apply-a-style-until-a-condition-is-met-with-while/


#2

You’ve created an infinite loop. Add the code to make it stop before you finish writing the loop itself.


#3

Whenever I do while loops in the browser I write them commented out first and then read through them to make sure they’re not going to create an infinite loop. I’ve lost a lot of work by forgetting to do this lol


#4

Makes sence… xD Thanks!