Hi there andynov123,
I have commented out the errors...
Code:
<script type ="text/javascript">
function totalVotes(){
var total = 0;
//var counter=0;
//var votes= = [94766, 168751, 116492, 103516, 86855];
var votes= [94766, 168751, 116492, 103516, 86855];
/*
votes0[0] = 94766;
votes1[1] = 168751;
votes2[2] = 116492;
votes3[3] = 103516;
votes4[4] = 86855;
*/
//for(i=0; i<=votes[counter];i++){
for(i=0; i<votes.length;i++){
total = votes[i] + total;
window.alert("The total is: " + total);
}
}
</script>
<script type="text/javascript">
totalVotes();
</script>
coothead