title: Vuejs computed properties with array
body: <p>I have the following component:</p>
  
  <pre><code>data() {
     return {
       cars: []
     }
  }
  </code></pre>
  
  <p>And I need to set a color to each car:</p>
  
  <pre><code>&lt;div v-for="car in cars"&gt;
     &lt;span :color="setColor"&gt;&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How can I set a specific color to each car using a computed property ?
  I have to use a specific logic inside a function:</p>
  
  <pre><code>if (car == 'a') {
    return 'black'
  } else if (car == 'b') {
    return 'blue'
  }
  </code></pre>