jQuery need a simple way to compare arrays then display an alert for equal and other for false
<p>Is there a simple way of comparing two arrays, then having an alert (or some other function later on) pop up if the arrays are equal, and one when it is not?</p>

<p>Here is my array</p>

<pre><code>var answerKey = ["four", "two", "one", "three"];
var answers = [];
</code></pre>

<p>jQuery I have so far for this</p>

<pre><code>$("#subBtn").click(function() {
$('#bin a').each(function() {
    answers.push($(this).attr('name'));
})
console.log(answers);
});
</code></pre>

<p>HTML</p>

<pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;a draggable="true" href="#" id="one" name="uno" class="imgHvr"&gt;One&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a draggable="true" href="#" id="two" name="dos" class="imgHvr"&gt;2&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a draggable="true" href="#" id="three" name="tres" class="imgHvr"&gt;three&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a draggable="true" href="#" id="four" name="sweet" class="imgHvr"&gt;4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
