package
0.0.0-20230817172732-9976b92f604f
Repository: https://github.com/bootdotdev/fcc-learn-golang-assets.git
Documentation: pkg.go.dev

# README

Named Return Values - Implicit Returns

Even though a function has named return values, we can still explicitly return values if we want to.

func getCoords() (x, y int){
  return x, y // this is explicit
}

Using this explicit pattern we can even overwrite the return values:

func getCoords() (x, y int){
  return 5, 6 // this is explicit, x and y are NOT returned
}

Otherwise, if we want to return the values defined in the function signature we can just use a naked return (blank return):

func getCoords() (x, y int){
  return // implicitly returns x and y
}

Assignment

Fix the function to return the named values implicitly.