Results for “Object behavior & collections”
Small, practical examples. Search by task or narrow things down below.
Type a dictionary with Record
Limit a lookup table to a known set of keys.
Record✓ Tested
Update a signal from its previous value
Update a signal from its previous value with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Update one array item by its identifier
Update one array item by its identifier with a small React component and explicit browser behavior.
React✓ Tested
Update repeatedly with a cleaned-up interval
Update repeatedly with a cleaned-up interval with a small React component and explicit browser behavior.
React✓ Tested
Update state from its previous value
Update state from its previous value with a small React component and explicit browser behavior.
React✓ Tested
Update state shared through context
Update state shared through context with a small React component and explicit browser behavior.
React✓ Tested
Use a context’s fallback value
Use a context’s fallback value with a small React component and explicit browser behavior.
React✓ Tested
Use a deque as a stack
Java: Use push and pop for last-in, first-out behavior.
Java✓ Tested
Use headings to show document structure
HTML: Learn how to use headings to show document structure in a complete browser example.
HTML✓ Tested
Use native required-field validation
Use native required-field validation with a small React component and explicit browser behavior.
React✓ Tested
Use React 19’s provider shorthand
Use React 19’s provider shorthand with a small React component and explicit browser behavior.
React✓ Tested
Use semantic page landmarks
HTML: Learn how to use semantic page landmarks in a complete browser example.
HTML✓ Tested