There is a line of iPhones, it is known that different models have different body colors, for example, knowing that the user has chosen the iPhone 5s to display only div blocks with gray silver gold colors? Yes, it can be organized through:
if (модель телефона==5s) { скрыть все цвета показать gray показать silver показать gold } else if { и тд } But I would like a more logical solution, maybe there are ideas? When clicking on the phone model, the model number is taken from the corresponding data-model attribute, 4 5 5c 5s and so on. I thought to create an object with all the models and colors, and check it out with it, but I don’t know how to organize it all.
var colors = { '5': ['red', 'white'], '5s' : ['green', 'yellow'], ...}- teran