From a9d4cea9141f4defe1880dbac7b09bb7c0ccdf05 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Thu, 29 Feb 2024 18:12:38 -0600 Subject: [PATCH] Fix rank off-by-one --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 0e3b770..f92f938 100644 --- a/index.html +++ b/index.html @@ -84,7 +84,7 @@ if (!city.guessed) { city.guessed = true; - this.message = `${city.name} (population ${city.pop}) is the ${ordinal_suffix_of(rank)} most populated city in ${this.state}.`; + this.message = `${city.name} (population ${city.pop}) is the ${ordinal_suffix_of(rank + 1)} most populated city in ${this.state}.`; this.city_guess = ""; } else { this.message = `Already guessed ${city.name} (population ${city.pop}, rank ${rank}).`;