FIND YOUR NEXT FEW LINES

Results for “Object behavior & collections”

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

631 snippets foundClear filters
TypeScriptUtilities & async

Select fields with the Pick utility type

Expose a smaller view of a larger object type.

Pick✓ Tested
jQueryTraversal & selection

Select siblings up to a boundary

jQuery: nextUntil excludes the boundary element itself.

jQuery✓ Tested
jQueryTraversal & selection

Select siblings while excluding the current element

jQuery: siblings selects other children of the same parent.

jQuery✓ Tested
ReactRefs & DOM interaction

Select the contents of an input

Select the contents of an input with a small React component and explicit browser behavior.

React✓ Tested
jQueryTraversal & selection

Select the immediately following sibling

jQuery: next does not search beyond the next sibling.

jQuery✓ Tested
jQueryTraversal & selection

Select the immediately preceding sibling

jQuery: prev moves backward by one sibling.

jQuery✓ Tested
HTMLGetting Started

Separate prose into paragraphs

HTML: Learn how to separate prose into paragraphs in a complete browser example.

HTML✓ Tested
ReactContext & shared state

Separate state and dispatch contexts

Separate state and dispatch contexts with a small React component and explicit browser behavior.

React✓ Tested
HTMLTables & list numbering

Separate table headings data and totals

HTML: Thead, tbody, and tfoot group rows according to their purpose.

HTML✓ Tested
jQueryDeferred work & queues

Sequence work on an element’s queue

jQuery: A queue callback calls next to allow the following callback to run.

jQuery✓ Tested
PowerShellText & data

Serialize a hashtable as JSON

Produce compact JSON for a small data object.

JSON✓ Tested
jQueryForm serialization & state

Serialize successful controls for a URL-encoded request

jQuery: serialize includes named enabled controls and checked checkboxes.

jQuery✓ Tested