I'm trying to clean up my code and was curious if it's possible to create a variable that contains other variables.
Pretty much I'm trying to turn this...
// variables are elements on a page
var1.show();
var2.show();
var3.show();
var4.hide();
var5.hide();
Into this...
var showViewVariables = (var1, var2, var3);
var hideViewVariables = (var4, var5);
showViewVariables.show();
hideViewVariables.hide();
Not sure if this fails to work due to my syntax or if its even capable.
I've found some answers where multiple selectors are placed in a variable and called together but haven't found much of anything with variables inside one variable.