I wonder why this.show would return undefined, meanwhilte quiz.show will return the function.
This code works:
const quiz = {
//Generates the quiz
generateQuiz: () => {
quiz.resetQ();
quiz.generateRandomQuestions();
quiz.displayQuiz();
quiz.show();
},
This returns undefined:
const quiz = {
//Generates the quiz
generateQuiz: () => {
this.resetQ();
this.generateRandomQuestions();
this.displayQuiz();
this.show();
},