having issues with the identifier on the simple application in chapter 1 6th edition
it took me a wile to figure out to not write “…” I’m reading and typing at once. here is my code so far i will include a screen shot and the code it seems my question and answer Labels are using the wrong identifiers
any help would be appreciated
thank you in advance
import UIKit
class ViewController: UIViewController {
@IBOutlet var questionLable: UILabel!
@IBOutlet var answerLable: UILabel!
let questions: [String] = ["What is 7+7?",
"What is the capital of Vermont?",
"what is cognac made from?"
]
let answers: [String] = ["14",
"Monteplier",
"Grapes"
]
var currentQuestionIndex: Int = 0
@IBAction func showNextQuestion(_ sender: UIButton) {
currentQuestionIndex += 1
if currentQuestionIndex == questions.count {
currentQuestionIndex = 0
}
let question: String = questions[currentQuestionIndex]
questionLabel.text = question
answerLabel.text = "???"
}
@IBAction func showAnswer(_ sender: UIButton) {
let answer: String = answers[currentQuestionIndex]
answerLabel.text = answer
}
override func viewDidLoad() {
super.viewDidLoad()
questionLable.text = [questionLableIndex]
}
}