We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Multiple Parameters

When multiple arguments are of the same type, and are next to each other in the function signature, the type only needs to be declared after the last argument.

Here are some examples:

func addToDatabase(hp, damage int) {
  // ...
}
func addToDatabase(hp, damage int, name string) {
  // ?
}
func addToDatabase(hp, damage int, name string, level int) {
  // ?
}