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
AngularGetting Started

Store reactive state in a signal

Store reactive state in a signal with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
HTMLDocument structure

Structure a document with headings

Use a single page heading and a second-level section heading in HTML.

HTML✓ Tested
AngularLists & control flow

Style the first and last list items

Style the first and last list items with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactPerformance & rendering

Subscribe to a small external store safely

Subscribe to a small external store safely with a small React component and explicit browser behavior.

React✓ Tested
ReactEffects & lifecycle

Subscribe to and clean up a window event

Subscribe to and clean up a window event with a small React component and explicit browser behavior.

React✓ Tested
HTMLMetadata & document links

Suggest a browser interface color

HTML: Theme-color is a browser chrome hint and does not style the page itself.

HTML✓ Tested
TypeScriptCollections & records

Sum typed values with reduce

Accumulate numeric array elements.

reduce✓ Tested
ReactGetting Started

Supply a default prop value

Supply a default prop value with a small React component and explicit browser behavior.

React✓ Tested
HTMLMetadata & document links

Supply a title and URL for link previews

HTML: Open Graph metadata describes a shared page without changing its visible content.

HTML✓ Tested
AngularSignals & state

Synchronize a document property with an effect

Synchronize a document property with an effect with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactGetting Started

Synchronize the document title with state

Synchronize the document title with state with a small React component and explicit browser behavior.

React✓ Tested
C#LINQ transformations

Test whether any or all values match

C#: Any and All short-circuit instead of materializing filtered collections.

C#✓ Tested