javascript Array comparision to check weightage is 100 or not for same program
<p>i have 2 arrays as bellow</p>

<p>1)ProgramId(numeric)<br>
2)Weightage(numeric)<br>
How to check,for the same programid weather weightage of that programid is 100 or not ie    </p>

<p><strong>ProgramId</strong><br>
2<br>
2<br>
3<br>
3<br>
2<br>
4<br>
<strong>Weightage</strong><br>
25<br>
25<br>
30<br>
70<br>
50<br>
45<br>
here for <strong>ProgramId</strong> 3 <strong>Weightage</strong> becomes 100(30+70) so now onwards <strong>ProgramId</strong> 3 should not be insert into array(programid)</p>

<p>next same to programid 2<br>
here also weightage=25+25+50=100 so nowonwards should not insert programid 2</p>

<p>thanks in advance</p>
