FIND YOUR NEXT FEW LINES
The snippet library.
Small, practical examples. Search by task or narrow things down below.
5 snippets foundClear filters
Choose an action with switch
Map a small command value to a result.
switch✓ Tested
Define a function with a typed parameter
Accept a name and return a greeting.
function✓ Tested
Handle a terminating error
Catch conversion failures and produce a clear fallback.
try catch✓ Tested
Pass named parameters from a hashtable
Keep a command’s options together in a reusable object.
splatting✓ Tested
Transform each item in a collection
Build a result array with a foreach expression.
foreach✓ Tested