//hashmap of arrays
var arrayStore = {
array1: [1,2,3],
array2: ["a", "b", "c"],
array3: [{id: 1}, {id: 2}]
};
// you access to arrays with a name as string.
// if name doesn't exixts in the hashmap, assing
// an empty array as default value.
var array = arrayStore[nameOfArray] || [];
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
//hashmap of arrays
var arrayStore = {
array1: [1,2,3],
array2: ["a", "b", "c"],
array3: [{id: 1}, {id: 2}]
};
// you access to arrays with a name as string.
// if name doesn't exixts in the hashmap, assing
// an empty array as default value.
var array = arrayStore[nameOfArray] || [];