Encountered an issue:
Error message - questions does not exist on type 'Quiz[]'
A look at my model
export interface Quiz {
$key ?: string;
categorie ?: string;
questions : Questions[]
}
export interface Questions {
id ?: number;
question ?: string;
answer?: string;
}
Here's the code snippet in question
import {Quiz} from "../models/quiz";
export class ProfComponent {
quiz = [] as Quiz[];
nextQuestion(quiz) {
this.quiz.questions.push(quiz.questions)
}
}
Issue faced while pushing data into quiz.questions
Seeking insights on potential errors here.