Skip to content

Instantly share code, notes, and snippets.

@gislig
Last active August 1, 2018 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gislig/b6d2e9f4055049d464c833d377e32ef7 to your computer and use it in GitHub Desktop.
Save gislig/b6d2e9f4055049d464c833d377e32ef7 to your computer and use it in GitHub Desktop.
This is not how to define a default value parameter in a code.
function DefaultValue($valueParam){
if($valueParam -eq $null){ $valueParam = 10 }
Write-Host $valueParam
}
DefaultValue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment