Cannot read property '1' of null

<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/courses/learn-sass/lessons/functions-and-operations/exercises/for-loops?action=lesson_resume&link_content_target=interstitial_lesson

<In what way does your code behave incorrectly? Include ALL error messages.>
Cannot read property β€˜1’ of null

```

Replace this line with your code.

$total: 10; //Number of .ray divs in our html
$step: 360deg / $total; //Used to compute the hue based on color-wheel

.ray {
height: 30px;
}

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

<do not remove the three backticks above>

Did you mean .ray:nth-child($i) { ?

No, it on first line of the loop.

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

my mistake, I forgot $ before β€œfor”

1 Like

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