DEV Community

Discussion on: Kotlin for JS Devs (Part 1)

Collapse
 
elimisteve profile image
Steve Phillips

Great post, thanks!

One question about this Kotlin example:

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
}
Enter fullscreen mode Exit fullscreen mode

Doesn't location need to be location: String, and doesn't there need to be a return type specified? Thanks.