In javascript I can 'create' an associative array by initializing a javascript object via JSON
eg var bArr = {"key1": "val1","key2": "val2", "key3": "val3"}
then access the array elements like bArr["key1"], bArr["key2"], bArr["key3"].
However instead of initialization with JSON can we somehow just index elements like bArr["key1"] in a loop and assign them values individually ?