We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
View the source code
Run:
functions.ps1
Demonstrates defining and calling functions.
Here's the way you define a function:
function MoviePrice { param($age) if($age -lt 12) { 10 } else { 15 } }
You can call a function with or without parentheses. You can use named arguments, or not:
MoviePrice 16 MoviePrice(7) MoviePrice($age = 13) MoviePrice $age = 60
There was an error while loading. Please reload this page.