Ranked choice voting implemented in Javascript