I'm trying to use an associative multi-dimensional array in javascript, but there is something wrong in the code.
html
<p onclick="myFunction()">Test</p>
javascript
myFunction = function() {
alert(1);
obj['temp']['room'] = 1;
alert(2);
}
The result is that only the first alert is fired. What is wrong in the definition of the array?