Open fxpar opened 7 months ago
Hi, I have multiple writers (looping on all characters in an expression). How to get the index of the current writer when there is a mistake?
writer[i].quiz({ onMistake: function(strokeData) { console.log('currentWriterIndex:' + ???); },
I did get something with writer.findIndex(({_char}) => _char === strokeData.character); but it won't work with expressions with repetitive characters like 哥哥 or 弟弟.
writer.findIndex(({_char}) => _char === strokeData.character);
Thanks for your help.
Hi, I have multiple writers (looping on all characters in an expression). How to get the index of the current writer when there is a mistake?
I did get something with
writer.findIndex(({_char}) => _char === strokeData.character);
but it won't work with expressions with repetitive characters like 哥哥 or 弟弟.Thanks for your help.