Use toUpperCase instead of toLowerCase
This commit is contained in:
parent
7fe9e10268
commit
f8324fd12e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user