How can I write a function instead of this Replace snippet and use it inside my checkAnswer method?
methods: {
checkAnswer: function () {
this.quiz.userInputArray = this.quiz.userAnswerArray.replace('Ğ','g')
.replace('Ü','u')
.replace('Ş','s')
.replace('I','i')
.replace('ç','c');
}
I want to be able to use it code like this:
this.quiz.userInputArray = this.quiz.userAnswerArray.replaceFunc()