Results for “save”
Small, practical examples. Search by task or narrow things down below.
Return a value through a named output variable
Bash Scripts: A Bash nameref can update a caller-supplied variable without command substitution.
Bash Scripts✓ Tested
Return an array through a nameref
Bash Scripts: Assign through a nameref to preserve array element boundaries.
Bash Scripts✓ Tested
Return text from a shell function
Capture a function’s output with command substitution.
function✓ Tested
Return the first item with a generic function
Preserve the element type while allowing empty arrays.
generics✓ Tested
Return to the previous collection in a chain
jQuery: end restores the selection before the last traversal operation.
jQuery✓ Tested
Return two values from a function
Return two values from a function using a complete Go program with explicit sample inputs.
Go✓ Tested
Return typed data from an async function
Await a Promise and handle failures explicitly.
async✓ Tested
Reuse a CSS custom property
CSS: Learn how to reuse a CSS custom property in a complete browser example.
CSS✓ Tested
Reuse colors with custom properties
Define a CSS custom property and use it for text color.
CSS✓ Tested
Reveal a collapsed panel with a slide
jQuery: slideDown animates the panel’s vertical dimensions.
jQuery✓ Tested
Reverse a copy while preserving the original
JavaScript: Copy before reverse because reverse mutates the array it receives.
JavaScript✓ Tested
Reverse a copy while preserving the original
TypeScript: Copy before reverse because reverse mutates the array it receives.
TypeScript✓ Tested