Top 1,000 Features Creators Resources Extensions Blog Explorer CSV Download
GitHub icon

Default Parameters Pattern

< >
Example from 1 languages: JavaScript
function multiply(a, b = 1) { return a * b; }
Example from 1 languages: C#
public void ExampleMethod(string optionalstr = "default string") {}
Example from 1 languages: Elixir
def multiply(a, b \\ 1) do a * b end
Example from 1 languages: C3
fn void test(int x = 10) { ... }
Example from 1 languages: Speedie
function Find (|string| pattern, |int| pos=0, |int|)
*

Languages with Default Parameters Pattern include JavaScript, C#, Elixir, C3, Speedie

*

View all concepts with or missing a hasDefaultParameters measurement

*

Read more about Default Parameters Pattern on the web: 1.

View source

- Build the next great programming language About Acknowledgements Part of the World Wide Scroll