FIND YOUR NEXT FEW LINES

Results for “Arrays & embedded state”

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

517 snippets foundClear filters
jQueryCollections & styling

Apply classes from explicit Boolean state

jQuery: The second toggleClass argument applies a known state consistently.

jQuery✓ Tested
Arduino / CBinary values & packets

Assign a bit from a Boolean state

Arduino / C: bitWrite accepts a bit position and a zero or nonzero value.

Arduino / C✓ Tested
HTMLImages & embedded documents

Block scripts in an embedded document

HTML: An empty sandbox attribute applies the default set of restrictions, including blocking script execution.

HTML✓ Tested
ReactState & reducers

Calculate derived state during rendering

Calculate derived state during rendering with a small React component and explicit browser behavior.

React✓ Tested
GoFunctions & types

Capture state in a closure

Capture state in a closure using a complete Go program with explicit sample inputs.

Go✓ Tested
ReactState & reducers

Centralize state changes in a reducer

Centralize state changes in a reducer with a small React component and explicit browser behavior.

React✓ Tested
JavaScriptArray restructuring

Concatenate arrays without mutating either input

JavaScript: concat creates a shallow combined sequence.

JavaScript✓ Tested
TypeScriptArray restructuring

Concatenate arrays without mutating either input

TypeScript: concat creates a shallow combined sequence.

TypeScript✓ Tested
jQueryForm serialization & state

Distinguish current state from initial markup

jQuery: prop reads the live checked state; attr reads the original checked attribute.

jQuery✓ Tested
HTMLAccessible structure

Expose a disclosure button’s expanded state

HTML: Keep aria-expanded synchronized with the controlled panel’s hidden state.

HTML✓ Tested
ReactAccessibility & events

Expose a disclosure’s expanded state

Expose a disclosure’s expanded state with a small React component and explicit browser behavior.

React✓ Tested
AngularAccessibility & reusable patterns

Expose a disclosure’s expanded state

Expose a disclosure’s expanded state with a standalone Angular component and explicit browser behavior.

Angular✓ Tested