From bced01bef25edf1985173c4d300565023b9b380a Mon Sep 17 00:00:00 2001 From: AdelisJose97 Date: Thu, 16 May 2024 18:55:58 -0400 Subject: [PATCH] feat: call game over when there is no next word --- 03-midu-typing-game/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/03-midu-typing-game/index.html b/03-midu-typing-game/index.html index 83e5488..ac50a68 100644 --- a/03-midu-typing-game/index.html +++ b/03-midu-typing-game/index.html @@ -322,7 +322,10 @@

$nextActiveLetter.classList.add('active') } else { $currentLetter.classList.add('active', 'is-last') - // TODO: gameover si no hay próxima palabra + const isLastWord = !$currentWord.nextElementSibling + if(isLastWord){ + gameOver() + } } }