Basic JavaScript counter
Good: Use if-elseif

You are calling 4 if statements with your code even if the 1st one is true. These are all mutually exclusive statements so use if-elseif

for (var i=0; i&lt;choices.length; i++) {
    if (choices[i]=="A") {
        total+=1;
    } else if (choices[i]=="B") {
        total+=2;
    } else if (choices[i]=="C") {
        total+=3;
    } else if (choices[i]=="D") {
        total+=4;
    }
}


Better: Use a switch statement

for (var i=0; i&lt;choices.length; i++) {
    switch (choices[i]) {
        case 'A': 
            total += 1;
            break;
        case 'B': 
            total += 2;
            break;
        case 'C': 
            total += 3;
            break;
        case 'D': 
            total += 4;
            break;
    }
}


Best: Convert the character to its numeric equivalent using its ASCII value

for (var i = 0; i &lt; choices.length; i++) {
    //omitted validation that character is a legal value...
    total += choices[i].charCodeAt(0) - 64;
}