Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

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

*

Languages without Default Parameters Pattern include Lil

*

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 Add About Search Keywords Livestreams Labs Resources Acknowledgements Part of the World Wide Scroll