Default Parameter Values
Named parameters can have default values using the syntax name!: Type = defaultValue. When calling a function, if you omit a parameter with a default value, the default value is used automatically; you can also explicitly pass a value to override the default.
Only named parameters can have default values; regular parameters cannot have default values. Default value expressions are evaluated at function definition time, not recalculated on each call. Default parameters can reduce function overloading and make APIs cleaner.
The code on the right shows greet and connect functions, both with default parameters. You can pass only some parameters, while others use default values. Observe the output from different calling styles.
Try calling connect passing only the host parameter to see what default values are used for port and secure connection.