📅  最后修改于: 2022-03-11 15:00:59.204000             🧑  作者: Mango
mutating func nextQuestion(){ // add "mutating" before func to change value of variables from (the struct)
if questionNumber + 1 < questions.count { // to count answered questions
questionNumber += 1
}else{
questionNumber = 0
}
}