From c7733dd0a2e4ffbbbb271d1271e197bcbefc40bd Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Tue, 7 Mar 2023 17:30:15 -0600 Subject: [PATCH] JavaScript is an absolutely bizarre language --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 8311e10..c34971a 100644 --- a/index.html +++ b/index.html @@ -44,7 +44,7 @@ let compare1 = array[i].slice(0, array[i].indexOf(" ")); let compare2 = array[j].slice(0, array[j].indexOf(" ")); console.log(compare1 + " " + compare2); - if (compare1 > compare2) { + if (compare1 >= compare2) { array[i] = array.splice(j, 1, array[i])[0]; } } @@ -55,6 +55,7 @@ console.log(array[i]); console.log(typeof(array[i])); } + document.write("JavaScript is an absolutely bizarre language.");