iOS Functions in Swift Functions in Swift Recap: Functions

CJ Doyle
CJ Doyle
1,177 Points

I feel like I'm missing something.

func temperatureInFahrenheit(temperature: Double) -> Double {

return (temperature) * 9 / 5 + 32 let fahrenheitTemp = temperatureInFahrenheit(temperature: 24.0)

}

functions.swift
// Enter your code below

func temperatureInFahrenheit(temperature: Double) -> Double {

  return (temperature) * 9 / 5 + 32
  let fahrenheitTemp = temperatureInFahrenheit(temperature: 24.0) 

}

1 Answer

Ahmad Lala
Ahmad Lala
2,312 Points

For one, this statement should be outside the function's curly braces: let fahrenheitTemp = temperatureInFahrenheit(temperature: 24.0)