You could also set the display to all the fields to hidden and then only switch the needed field to visible for a given score. JavaScript also has the "switch" statement so one does not need to use the nested if statement.

This cuts down on the number of lines to code by starting with a known state and changing the minimum of fields and uses a compound case statement to reduce the amount of redundant code. This could also be done with the "if" statement by using a complex logical statement use the logical OR operator.