Using Ionic if-else statement for Speech recognition (NEED URGENT HELP PLEASE!)


I am on my project. I am using Ionic speech recognition version 3 for practising English Pronunciation.
I want to use if-else for setting true and false in English Word Pronunciation.
For example, when users speak the word as “dark”; the result shows “true”. However, users speak another word; the result shows “false”

If anyone has any great ideas/recommends, please advice me.

Thank you so much!
I am a junior of Ionic.