diff --git a/morse-code_files/morse-code.js b/morse-code_files/morse-code.js index c1a78db..f499bc8 100644 --- a/morse-code_files/morse-code.js +++ b/morse-code_files/morse-code.js @@ -121,7 +121,7 @@ function convertAsciiWordToMorse(asciiWord) { // asciiSentence is something like 'dog is good' // Assumes words are separated by spaces. function convertAsciiSentenceToMorse(asciiSentence) { - let splitSentence = asciiSentence.toLowerCase().split(' '); + let splitSentence = asciiSentence.toUpperCase().split(' '); return splitSentence.map(convertAsciiWordToMorse); } @@ -283,7 +283,7 @@ class ListeningGame { } else { const enteredWord = this.wordInput.value; // console.log('enteredWord: ', enteredWord, 'target: ', this.target); - if (enteredWord.toLowerCase() == this.target) { + if (enteredWord.toUpperCase() == this.target) { // 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;