Use @each to Map Over Items in a List how can solve it?

Use @each to Map Over Items in a List how can solve it?
0.0 0

#1

Tell us what’s happening:

Your code so far


<style type='text/sass'>
  @each $color in blue, black, red{
  .#{$color}-text {background-color:$color;}
  }
  div {
    height: 200px;
    width: 200px;
  }
</style>

<div class="blue-bg"></div>
<div class="black-bg"></div>
<div class="red-bg"></div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:62.0) Gecko/20100101 Firefox/62.0.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/sass/use-each-to-map-over-items-in-a-list


#2

I have pass this challenge.