add more choices

This commit is contained in:
klemek
2021-10-14 15:37:05 +02:00
parent 401cafe1c5
commit c2a6b2a9b5
+9 -6
View File
@@ -69,11 +69,15 @@ const utils = {
},
contains: function (array, item) {
return array.indexOf(item) >= 0;
}
},
};
Array.prototype.shuffle = function() { return utils.shuffle(this);};
Array.prototype.contains = function(item) { return utils.contains(this, item);};
Array.prototype.shuffle = function () {
return utils.shuffle(this);
};
Array.prototype.contains = function (item) {
return utils.contains(this, item);
};
let app = {
el: "#app",
@@ -86,7 +90,7 @@ let app = {
rh: true,
rk: false,
hk: false,
answers: 4,
answers: 6,
},
kanas: [],
question: "あ",
@@ -159,7 +163,7 @@ let app = {
answer: function (v) {
const self = this;
const question = self.kanas.filter(kana => {
const question = self.kanas.filter((kana) => {
return kana.contains(self.question);
})[0];
@@ -170,7 +174,6 @@ let app = {
self.score = 0;
self.wrongAnswers.push(v);
}
},
changeOption: function (v) {
const self = this;