how to get all the combination from a group of arrays
<p>I have for example these arrays:</p>

<pre><code>a1 = ["1", "2", "3"];
a2 = ["a", "b"];
a3 = ["q", "w", "e"];

result = ["1aq", "1aw", "1ae", "1bq", "1bw", ... "3be"];
</code></pre>

<p>How could obtain this without nested loops (also using jquery, for example)?
Thanks</p>
