How to find the indices of duplicate values in an array after running a count for duplicate?
<p>I am aware that similar questions to this have been asked, but I have looked through these and am absolutly baffled as to a) how they work, and b) how I could adapt them to fit my purpose. I have therefore started a new question.</p>

<p>I have an array of only 4 indices, each index holds a number. My aim is to find the lowest value in this array and return the index of that lowest value. This has not been a problem...</p>

<p>The problem arises when the lowest value is repeated in more than one index.</p>

<p>In this case what I would like is to be able to first run a "count" on the array to find out if the lowest value is repeated, then if the count is >1 then do the following: find the indices of the repeated values, Finally I need to take the values of these indices and do a furthur calculation before finding the lowest value between them.</p>

<p>Example:</p>

<pre><code>    array[ 12.44 , 10.33 , 17.45 , 10.33]
    //First I need a count to find the number of times the lowest value (10.33) occurs
    //Then I would like a function to return either a string containing 1,3 to 
    //represent the indices, or an array[ 1 , 3 
</code></pre>

<p>Once again I apologise if this question has been answered already but please could you explain the answer as I have tried repeatedly to understand he previous answers and can't make head way.</p>

<p>Why is it so complicated to find repeated values in an array using js?</p>

<p>Thanks in advance for your help, and time!</p>

<p>John</p>
