FIND YOUR NEXT FEW LINES

Results for “collect”

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

164 snippets foundClear filters
JavaScriptObject behavior & collections

Read an object’s own enumerable values

JavaScript: Object.values provides values without their corresponding keys.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Read an object’s own enumerable values

TypeScript: Object.values provides values without their corresponding keys.

TypeScript✓ Tested
JavaScriptObject behavior & collections

Remove a Map entry and detect whether it existed

JavaScript: Map.delete returns true only when an entry was present.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Remove a Map entry and detect whether it existed

TypeScript: Map.delete returns true only when an entry was present.

TypeScript✓ Tested
GoSlices & collections

Remove a slice range

Remove a slice range using a complete Go program with explicit sample inputs.

Go✓ Tested
C#Collections & data structures

Remove matching items from a mutable list

C#: List.RemoveAll returns how many items it removed.

C#✓ Tested
JavaQueues & collection operations

Retrieve the smallest queued value first

Java: PriorityQueue poll removes the smallest value under the natural ordering.

Java✓ Tested
GoSlices & collections

Reverse slice order

Reverse slice order using a complete Go program with explicit sample inputs.

Go✓ Tested
C#Collections & data structures

Search a sorted array efficiently

C#: Array.BinarySearch requires an array sorted with the same comparison rules.

C#✓ Tested
jQueryCollections & styling

Set several inline styles together

jQuery: Pass a property-value object to css.

jQuery✓ Tested
GoSlices & collections

Sort integers in place

Sort integers in place using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaQueues & collection operations

Take an immutable list snapshot

Java: List.copyOf protects the snapshot from later changes to the source list.

Java✓ Tested