Why Cant I pass this - Sass: Use @for to Create a Sass Loop

Why Cant I pass this - Sass: Use @for to Create a Sass Loop
0

#1

I am working on the "Sass: Use @for to Create a Sass Loop", and it states to Write a @for directive that takes a variable $j that goes from 1 to 6.

It should create 5 classes called .text-1 to .text-5 where each has a font-size set to 10px multiplied by the index.

, so my code as written is - @for $j from 1 through 5{.text-#{$j} { font-size: 10px*$j; }
}, but for some reason, it is not letting me pass. Did I miss something?


#2

“that goes from 1 to 6.”

Not using the right key word. You need to use the keyword to. That goes to number 6, but it does not include 6. That will give you 1-5


#3

Thanks, I will rewrite my code. Fingers crossed.