title: Change color of text from an array dynamically
body: <p>I'm using Jquery to do some things from a website that I'm working on; I'm doing some requests and from the data that I get there are some values with color names and I'm storing them in an array; what I want to do is change the color of each one because sometimes there are different colors on each requests.</p>
  
  <p>I.E. User does request; from the data there is a  Green and Red value, before sending them to the page I want to change the color of Green to Green and Red to Red. If another request is made and the colors this time are Blue and Yellow I'd like to change the colors again with the process from above.</p>
  
  <p>This is what I have:</p>
  
  <pre><code>var typeArr = [];
  for (let l in data.types) {
          typeArr.unshift(data.types[l].type.name); //data.types is the data from the request
      }
  
  //This is the appended info at the page
  $('#types').html(`${typeArr[0].capitalizeFirstLetter()}`);
  if (typeArr[1] !== undefined)
  {
      $('#types').append(`/${typeArr[1].capitalizeFirstLetter()}`);
  }
  </code></pre>
  
  <p>I'm not exactly experiencing an error; I just want to know how to do that. That's what I have and it shows the names in the correct order but I want to change the color of the words. There are max 2 words in the array per request.</p>