无参数
类 / 方法
有返回值
无返回值
无参数
可选参数值
参数数组
外部参数名
省略外部参数名
修改参数
输出参数
输入输出参数
方法重载
类方法
多个返回值
consuming 方法
class
Greeting
{
func
sayGoodby
() {
print
(
"Goodby!"
)
}
}
let
greeting =
Greeting
()
greeting.
sayGoodby
()
语言
Python
C++
Java
C#
JavaScript
R
Rust
Golang
Delphi
PHP
Ruby
Kotlin
Lua
TypeScript
Clojure
Objective-C