Use @each to Map Over Items in a List allen

Tell us what’s happening:
I think My code is right, why My code run fail.

Your code so far


<style type='text/sass'>
  @each $color in blue, black, red {
     .#{$color}-bg {
        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 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36.

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

Fix your code. The syntax is wrong.

background-color: $color;