I\'m trying to create an associative array, create an empty array, and then add a (indexName
-> value) pair:
var arrayName = new Array;
arrayName[\
Indeed, there was no need for an array object, a simple object did the job; further more an array introduced the need to use quotes inside the square brackets obj["var1 + var2"]
to access the object property's value and not the value associated with an index (i think); the quotes transformed "var1 + var2"
into a string. Using a simple object eliminated the need for quotes, so I can use obj[var1 + var2]
, wich worked :)
Thanks everyone !