Here is the example of what I am doing:
var size = new Array("S", "M", "L", "XL", "XXL"); var color =
In that case you don't want to insert size and color inside an array, but into an object
size
color
var options = { 'size': size, 'color': color };
Afterwards you can access the sets of keys by
var keys = Object.keys( options );