If I have:
var red = ["#F33121", "#F06562", "#90A4AE"]; //my array called red.
var blue = ["#345678", "#234423", "#435223"]; //my array called blue.
var color = $('.element').text(); // = red
So now, console.log(color); returns red.
How can I get
console.log(color[0]) to return the contents of red[0]?
Sorry if it doesn't make sense, I can't think of a simpler way to put it.