Functions and Operations

Each Loops

Beyond the simple math and color transformations we explored in the previous exercises, Sass also allows for more complex functions.

Each loops in Sass iterate on each of the values on a list. The syntax is as follows:

@each $item in $list {
  //some rules and or conditions

The value of $item is dynamically assigned to the value of the object in the list according to its position and the iteration of the loop.

Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.