1 class WordMultiChoice extends WordQuiz {
3 let word = this.words.shift();
4 if (!word[2]) return this.next();
5 let form = put(this.form,
6 '+img[src=$]+ul', `/data/word/en/${word[2]}.jpg`,
9 let answers = [word[0], this.words[0][0], this.words[1][0], this.words[2][0]]
11 answers.forEach(suggest => {
12 let label = suggest.replace(/\/.*/, '');
13 let option = put(form, 'li', label, {onclick: () => {
14 if (suggest != word[0]) {
16 put(option, '.wrong');
20 window.setTimeout(() => this.next(), 500);
26 this.form = document.getElementById('quiz');