SOLVED: Use @for to Create a Sass Loop: How to add loop value?

SOLVED: Use @for to Create a Sass Loop: How to add loop value?
0

#1

Tell us what’s happening:

Not clear what to do to multiply the loop value for a CSS setting. Also loop uses through but not including 6 :’(

Solved: I was missing a $ in the text-# area

Your code so far


<style type='text/sass'>

 @for $j from 1 through 6 {
  .text-#{j} { font-size: #{j} * 10px; }    // ??
  .text-#{j} { font-size: $j * 10px; } // ??
  .text-#{j} { font-size: $j * 10; } . // ??

 .text-#{$j} ....
 }  
  
  
</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>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/sass/use-for-to-create-a-sass-loop