I am trying to pass a key-value array. I am using an object literal to construct my slider object, seen below.
var test1 = new Slider({set: ['value': 10, 'min': 0, 'max': 20,]});
But I cant seem to pass this associate array, it says : is an unexpected token. I can only pass a basic array like below.
set: [10, 0, 20,]
How do I correctly pass the associate array.
Thanks
You used the wrong kind of brackets:
[]for anArray,{}for anObject.