Check out example codes for "sass each index". It will help you in understanding the concepts better.

Code Example 1

$i: 0;
@each $food in $top-foods {
  $i: $i + 1;
  &:nth-child(#{$i}){
    display: block;
  }
}

Learn ReactJs, React Native from akashmittal.com