FIND YOUR NEXT FEW LINES

Results for “od”

Small, practical examples. Search by task or narrow things down below.

740 snippets foundClear filters
JavaScriptArray restructuring

Reverse a copy while preserving the original

JavaScript: Copy before reverse because reverse mutates the array it receives.

JavaScript✓ Tested
TypeScriptArray restructuring

Reverse a copy while preserving the original

TypeScript: Copy before reverse because reverse mutates the array it receives.

TypeScript✓ Tested
PowerShellDates & numeric validation

Round a decimal with a chosen midpoint rule

PowerShell: Use decimal input and an explicit rounding policy for a reproducible decimal result.

PowerShell✓ Tested
JavaScriptPromises & iteration protocols

Run cleanup after a promise settles

JavaScript: finally runs after success or failure and normally preserves the original outcome.

JavaScript✓ Tested
TypeScriptPromises & iteration protocols

Run cleanup after a promise settles

TypeScript: finally runs after success or failure and normally preserves the original outcome.

TypeScript✓ Tested
JavaScriptPromises & iteration protocols

Run dependent async steps in order

JavaScript: Await one result before using it as the input of the next calculation.

JavaScript✓ Tested
TypeScriptPromises & iteration protocols

Run dependent async steps in order

TypeScript: Await one result before using it as the input of the next calculation.

TypeScript✓ Tested
JavaScriptGetting Started

Run your first program

JavaScript: Start with a complete program that prints one line. Follow the run instructions below.

JavaScript✓ Tested
TypeScriptGetting Started

Run your first program

TypeScript: Start with a complete program that prints one line. Follow the run instructions below.

TypeScript✓ Tested
TypeScriptSafe data handling

Safely read a caught error

Check the error type before accessing its message.

unknown✓ Tested
AngularComponents & communication

Scope a component’s styles

Scope a component’s styles with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
HTMLInput constraints

Select a time in quarter-hour increments

HTML: A time step is expressed in seconds, so 900 represents fifteen minutes.

HTML✓ Tested