Skip to content

Commit

Permalink
feat: add score
Browse files Browse the repository at this point in the history
  • Loading branch information
KarpusKonstantin committed Apr 3, 2021
1 parent 9e47489 commit 687b407
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/SpeakIt/WordServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ export default class WordServices {
return result;
}

static getWordByWord(wordWithSuccessArray: IWordWithSuccess[], word: string): IWordWithSuccess {
return <IWordWithSuccess>wordWithSuccessArray.find((item) => {
if (item.word.toUpperCase() === word.toUpperCase()) {
return item;
}
});
}

static getCountError(wordArray: IWordWithSuccess[]): number {
let cnt = 0;

Expand Down

0 comments on commit 687b407

Please sign in to comment.