fun weatherReport(location) {
// Make an Ajax request to fetch the weather...
return Pair(72, "Mostly Sunny") // Pair is a standard class in Kotlin that represents a generic pair of two values
}
Doesn't location need to be location: String, and doesn't there need to be a return type specified? Thanks.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great post, thanks!
One question about this Kotlin example:
Doesn't
location
need to belocation: String
, and doesn't there need to be a return type specified? Thanks.