Widget:WJG Sandbox: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1,032: | Line 1,032: | ||
var myTotal = 0; //Variable to hold your total | var myTotal = 0; //Variable to hold your total | ||
for(var i=0, len=event.data.answeredRight; i<len; i++){ | for(var i=0, len=event.data.answeredRight+1; i<len; i++){ | ||
myTotal += qdist[i]; //Iterate over your first array and then grab the second element add the values up | myTotal += qdist[i]; //Iterate over your first array and then grab the second element add the values up | ||
} | } |