diff --git a/morse-code_files/morse-code.js b/morse-code_files/morse-code.js index 5366543..32a946d 100644 --- a/morse-code_files/morse-code.js +++ b/morse-code_files/morse-code.js @@ -294,7 +294,7 @@ class ListeningGame { } else { const enteredWord = this.wordInput.value; // console.log('enteredWord: ', enteredWord, 'target: ', this.target); - if (enteredWord.toUpperCase() == this.target) { + if (enteredWord.toUpperCase() == this.target.toUpperCase()) { // If they got the word, show message and switch event listener. this.statusElement.textContent = 'Correct! Press enter to play a new round.'; this.messageFound = true; @@ -617,7 +617,7 @@ class InputGame { // console.log('target: \'' + this.target + '\''); // console.log('this.letterStack.join(\'\'): \'' + this.letterStack.join('') + '\''); // console.log(this.letterStack.join('') == this.target); - if (this.letterStack.join('') == this.target) { + if (this.letterStack.join('').toUpperCase() == this.target.toUpperCase()) { // console.log('match!'); // Clear intervals clearTimeout(this.letterTimeout);