7. For Loops Question. What does #{$i} mean?

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/learn-sass/lessons/functions-and-operations/exercises/for-loops

<In what way does your code behave incorrectly? Include ALL error messages.>

@for $i from 1 through $total {
.ray:nth-child(#{$i}) {
background: blue;
}
}

Why there are the number sign(#) and curly braces( { } ) around the $i variable index? What are they doing there?
Can someone please explain it to me? Thanks in advance Codeacademy Schoolmates! :slight_smile:

```

Replace this line with your code.

<do not remove the three backticks above>

@coursepro67740,
From
http://sass-lang.com/documentation/file.SASS_REFERENCE.html
we choose
http://sass-lang.com/documentation/file.SASS_REFERENCE.html#interpolation_
and
http://sass-lang.com/documentation/file.SASS_REFERENCE.html#_10

== discussion / opinion ==
http://stackoverflow.com/questions/24885582/what-does-hash-sign-do-outside-loops-in-sass

Oh, string/char/text interpolation it is. Thanks for reminding, sir! :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.