Check out example codes for "loop scss". It will help you in understanding the concepts better.

Code Example 1

@for $i from 1 through 6 {
    .grid-#{$i} {
        width: 100px*$i;
    }
}

Code Example 2

@each $theme-name, $theme-color in $colors-theme-bo {
  .theme-#{$theme-name} {
    color: $theme-color;
  }
}

Learn ReactJs, React Native from akashmittal.com