I have two JSON arrays in JavaScript and both are like this.
First array:
[""Amarelo"", ""Amarelo"", ""Amarelo"", ""Preto"", ""Preto"", ""Preto""]
Second array:
[""Pequeno"", ""Médio"", ""Grande"", ""Pequeno"", ""Médio"", ""Grande""]
And I can have two variables that change by click which can be, for example "yellow" and "medium."
The question is: how do I know the index of when the values of the variables match those of the arrays?
Looking at this I know that the match index is 1, but how do I get JavaScript to figure this out on its own?
With this index value discovered I'll be able to call the rest of the content dynamically.
Can anyone suggest a north for me?