For Loops. "Cannot read property '1' of null" on second step


#1



https://www.codecademy.com/courses/learn-sass/lessons/functions-and-operations/exercises/for-loops?action=lesson_resume&link_content_target=interstitial_lesson


Hi! I get the "Cannot read property '1' of null" error after pressing run at the end of the second step of the exercise.

The browser displays the rainbow colors as it should be, but I can't progress because of the error.


$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 to $total {
  .ray:nth-child(#{$i}) {
background: adjust-hue(blue, $i * $step);
   }
}


#2

Anyone? Please help.


#3

I have the same problem. ■■■■!


#4

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