function multiply(a, b = 1) {
return a * b;
}
public void ExampleMethod(string optionalstr = "default string") {}
def multiply(a, b \\ 1) do
a * b
end
fn void test(int x = 10) { ... }
function Find (|string| pattern, |int| pos=0, |int|)
Languages with Default Parameters Pattern include JavaScript, C#, TypeScript, Elixir, C3, Speedie
This question asks: Does the language have a way to define default parameters for functions?
Read more about Default Parameters Pattern on the web: 1.
HTML of this page generated by Features.ts