Forming an new javascript array by combining two columns of another array
<p>I am trying to form a new array in javascript that consists of two 1 dimentional arrays (of the same length). </p>

<pre><code>var A = [1,2,3];
var B = [20, 10, 30];
</code></pre>

<p>and I want to create C: </p>

<pre><code>C = [[1,20],[2,10],[3,30]];
</code></pre>

<p>This seems like a fairly simple problem. I am wondering if there is a function I can use for this (to avoid loops). Perhaps something with <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/from" rel="nofollow">array.from</a> or map? I am having some trouble figuring out how that would work exactly. </p>