FIND YOUR NEXT FEW LINES

Results for “item”

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

127 snippets foundClear filters
JavaScriptArray traversal & selection

Find the first matching array item

JavaScript: find returns undefined when no item satisfies the predicate.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Find the first matching array item

TypeScript: find returns undefined when no item satisfies the predicate.

TypeScript✓ Tested
PowerShellArray operations

Find the index of an array item

PowerShell: Array.IndexOf returns -1 when the requested item is absent.

PowerShell✓ Tested
JavaScriptArray traversal & selection

Find the position of a matching item

JavaScript: findIndex returns -1 when the predicate matches nothing.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Find the position of a matching item

TypeScript: findIndex returns -1 when the predicate matches nothing.

TypeScript✓ Tested
CSSFlexbox alignment

Give an item the remaining horizontal space

CSS: A growing flex item absorbs free space after fixed items have been sized.

CSS✓ Tested
jQueryGetting Started

Insert a list item at the beginning

jQuery: Learn how to insert a list item at the beginning in a complete browser example.

jQuery✓ Tested
jQueryInsertion & wrapping

Insert an item at the beginning

jQuery: prepend inserts before the existing children.

jQuery✓ Tested
Bash ScriptsArray operations

Join array items with a one-character separator

Bash Scripts: A local IFS controls the separator used by the quoted star expansion.

Bash Scripts✓ Tested
PythonMappings & sets

Keep only the most recent items

Python: Use a bounded deque to discard the oldest item as new values arrive.

Python✓ Tested
JavaScriptArray restructuring

Map items to multiple output values

JavaScript: flatMap combines mapping and a one-level flattening operation.

JavaScript✓ Tested
TypeScriptArray restructuring

Map items to multiple output values

TypeScript: flatMap combines mapping and a one-level flattening operation.

TypeScript✓ Tested