title: Javascript: using tuples as dictionary keys
body: <p>I have a situation where I want to create a mapping from a tuple to an integer. In python, I would simply use a tuple <code>(a,b)</code> as the key to a dictionary,</p>
  <p>Does Javascript have tuples? I found that <code>(a,b)</code> in javascript as an expression just returns b (the last item). Apparently this is inherited from C.</p>
  <p>So, as a workaround, I thought I can use arrays instead,</p>
  <pre><code>my_map[[a,b]] = c
  </code></pre>
  <p>I tried it at the Firebug console and it seemed to work. Is that a good way to do it?</p>
  <p>Another alternative I thought of is to create a string out of the tuples</p>
  <pre><code>my_map[&quot;&quot;+a+&quot;:&quot;+b] = c
  </code></pre>
  <p>So the question is: is there any problem with any of these methods? Is there a better way?</p>
  <h3>EDIT:</h3>
  <p>Small clarification: in my case, a,b,c are all integers</p>