I would create an object like this:
var options = {
size: ["S", "M", "L", "XL", "XXL"],
color: ["Red", "Blue", "Green", "White", "Black"]
};
alert(Object.keys(options));
To access the keys individualy:
for (var key in options) {
alert(key);
}
P.S.: when you create a new array object do not use new Array
use []
instead.