Find biggest and smallest array Javascript
<p>I am trying to figure out the best way to compare two arrays.</p>

<p>Essentially I want to know the biggest and smallest array for further processing.  Here is my code for doing so thus far:</p>

<pre><code>merge: function(arrOne, arrTwo) {

   if(arrOne == null || arrTwo == null) throw new Error();

    var bigArr = arrOne.length &gt; arrTwo.length ? arrOne : arrTwo,
        smallArr = bigArr.length == arrOne.length ? arrTwo : arrOne;

    console.log(bigArr);
    console.log(smallArr);

}
</code></pre>

<p>While this works, I am guessing there has to be an easier and more efficient way of doing this.  Any thoughts?</p>
