How can I check same elements in Array? : <p>I have an array, and I want an output if it contains more than 1 of the same element.</p>

<p>Example:</p>

<pre><code>my_array = [1, 2, 3, 1];
</code></pre>
