PLDB
Languages Features Creators Calendar CSV Resources Blog About Donate Add Language
GitHub icon

Default Parameters Pattern

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

Languages with Default Parameters Pattern include JavaScript, C#, TypeScript, Elixir, C3, Static Typescript

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

HTML of this page generated by Features.ts

hasDecimals.html 路 hasDefaultParameters.html 路 hasDependentTypes.html

View source

PLDB - Build the next great programming language Search v2023 Day 157 Docs Acknowledgements Traffic Today Traffic Trends Mirrors GitHub feedback@pldb.com