Each Loops - 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/each-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. The ‘Get Code’ option doesn’t work either and I’m stuck on this page now. I’ve tried 2 options as mentioned on another thread for the same problem, but it still doesn’t work for me.

```

$list: (orange, purple, teal);
@each $item in $list {
.#{item} {
background: $item;
}
}

$list: (orange, purple, teal);
@each $item in list { . (.#{item}) {
background: $item;
}
}

<do not remove the three backticks above>

invalid syntax, have a second look at what they want you to write in your loop

Thanks for your reply @ionatan. did you mean the first or the second? as in, without the $. () or with it?

Nvm, just realised the issue, silly me! Thanks again :slight_smile:

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