mirror of
https://github.com/bootdotdev/fcc-learn-golang-assets.git
synced 2025-12-17 02:31:17 +00:00
first
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"question": "Which of the following is the most succinct way to write a function signature?",
|
||||
"answers": [
|
||||
"func createUser(firstName, lastName string, age int)",
|
||||
"func createUser(firstName string, lastName string, age int)"
|
||||
]
|
||||
}
|
||||
13
course/3-functions/exercises/2-multiple_params/readme.md
Normal file
13
course/3-functions/exercises/2-multiple_params/readme.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Multiple Parameters
|
||||
|
||||
When multiple arguments are of the same type, the type only needs to be declared after the last one, assuming they are in order.
|
||||
|
||||
For example:
|
||||
|
||||
```go
|
||||
func add(x, y int) int {
|
||||
return x + y
|
||||
}
|
||||
```
|
||||
|
||||
If they are not in order they need to be defined separately.
|
||||
Reference in New Issue
Block a user