Getting age=infinity while trying to get min and max age
<p>I am implementing a project in which I have to find the <code>minimum</code> and k age of the mice present in the cage.</p>

<p>the code I am using is:</p>

<pre><code>   var earTags = "";
            var miceAge = "";
            var genoTypes = "";
            for (var curr_mice_cnt = 0, mice_len = data.mice_info.length; curr_mice_cnt &lt; mice_len; curr_mice_cnt++ )
            {
                alert("Inside for loop");
                var m_info = data.mice_info[curr_mice_cnt];
                console.log("Mice Len="+data.mice_info.length);
                earTags = earTags + m_info.ear_tag + ", " ;
                miceAge = miceAge + m_info.age + ", ";
                genoTypes = genoTypes + getGenotypeName(m_info.genotype_id) + ", ";

                var lowest = Number.POSITIVE_INFINITY;
                var highest = Number.NEGATIVE_INFINITY;
                var tmp;
                for (var i=miceAge.length-1; i&gt;=0; i--) {
                    tmp = miceAge[i].Cost;
                    if (tmp &lt; lowest) lowest = tmp;
                    if (tmp &gt; highest) highest = tmp;
                }
                console.log(highest, lowest);

            }
</code></pre>

<p>Now I am trying to display the <code>miceage</code> which is as string and i want to find the min and max value of the string and the error I am getting is <code>Miceage=Infinity</code>.</p>

<p>Can anyone please help me implement this or can You suggest any other code to implement this.</p>
