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

Code Example 1

@for $i from 1 through 3 {
  ul:nth-child(3n + #{$i}) {
    background-color: lighten($base-color, $i * 5%);
  }
}

Learn ReactJs, React Native from akashmittal.com