DEV Community

Jocelyne1124
Jocelyne1124

Posted on

Discussion 11

I believe conditionals are important because they give meaning to a value. You an assign certain int values to certain strings and it can produce a more intricate statement.

func tStat( roomTemperature: Int, currentSetting: Int)

let heaterSetting = roomTemperature =< currentSetting {
else return kickStartHeater
}
let coolingSetting = roomTemperature => currentSetting{
else return kickStartCooler
}

Top comments (0)