Question 1/12: This code is valid Swift – true or false?
Hint: Click to show.
func calculateWages(payBand: Int, isOvertime: Bool = false) -> Int {
var pay = 10_000 * payBand
if isOvertime {
pay *= 2
}
return pay
}
calculateWages(payBand: 5, isOvertime: true)
Link copied to your pasteboard.